:root {
    /* System Icons - Professional Base64 Encoding to prevent rendering errors */
    --icon-chevron-blue: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlPSIjMWU5ZmYyIiBzdHJva2Utd2lkdGg9IjIuNSI+PHBhdGggc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJNMTkgOWwtNyA3LTctNyIvPjwvc3ZnPg==");
    --icon-chevron-indigo: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlPSIjNjM2NmYxIiBzdHJva2Utd2lkdGg9IjIuNSI+PHBhdGggc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJNMTkgOWwtNyA3LTctNyIvPjwvc3ZnPg==");
    --icon-tick-white: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCI+PHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZmZmIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iNCIgZD0iTTUgMTBsMyAzbDctNyIvPjwvc3ZnPg==");
    --icon-tick-indigo: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjNjM2NmYxIiBzdHJva2Utd2lkdGg9IjQiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBvbHlsaW5lIHBvaW50cz0iMjAgNiA5IDE3IDQgMTIiPjwvcG9seWxpbmU+PC9zdmc+");
}

/* Modern Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
    border: 2px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Hide Horizontal Scrollbar for Responsive Tables */
.table-responsive::-webkit-scrollbar {
    height: 0px !important;
    width: 0px !important;
    display: none !important;
}

.table-responsive {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}


select,
select.form-control {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: var(--icon-chevron-blue) !important;
    background-repeat: no-repeat !important;
    background-position: right 0.85rem center !important;
    background-size: 1.1rem !important;
    padding-right: 2.8rem !important;
    padding-left: 1.25rem !important;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease !important;
}

/* Global Select Options & Displayed Text Font Size Reduction */
select option,
select,
select.form-control {
    font-size: 0.9rem !important;
}

html[data-textdirection="rtl"] select,
html[data-textdirection="rtl"] select option,
html[data-textdirection="rtl"] select.form-control {
    font-size: 0.925rem !important;
    background-position: left 0.85rem center !important;
    padding-left: 2.8rem !important;
    padding-right: 1.25rem !important;
}

html[data-textdirection="ltr"] select,
html[data-textdirection="ltr"] select option,
html[data-textdirection="ltr"] select.form-control {
    font-size: 0.8rem !important;
    background-position: right 0.85rem center !important;
    padding-right: 2.8rem !important;
    padding-left: 1.25rem !important;
}

select:focus {
    border-color: #1e9ff2 !important;
    box-shadow: 0 0 0 4px rgba(30, 159, 242, 0.1) !important;
}

table.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control:before,
table.dataTable.dtr-inline.collapsed>tbody>tr>th.dtr-control:before {
    display: inline-flex !important;
    align-items: center !important;

    content: "" !important;
    width: 14px !important;
    height: 14px !important;
    border: none !important;
    background: transparent !important;
    margin-right: 8px !important;
    margin-left: 0 !important;
    /* Drawing a cleaner triangle */
    border-top: 5px solid transparent !important;
    border-bottom: 5px solid transparent !important;
    border-left: 8px solid rgba(0, 0, 0, 0.4) !important;
    /* Pointing RIGHT for LTR */
    border-right: 0 !important;
    transition: transform 0.2s ease !important;
}

table.dataTable.dtr-inline.collapsed>tbody>tr.parent>td.dtr-control:before,
table.dataTable.dtr-inline.collapsed>tbody>tr.parent>th.dtr-control:before {
    transform: rotate(90deg) !important;
    /* Rotate when expanded */
}

[data-textdirection="rtl"] .main-menu.menu-dark .navigation>li.has-sub>a:after {
    content: "\f111" !important;
    /* la-angle-left */
    font-family: 'LineAwesome' !important;
    font-size: 1rem !important;
    display: inline-block !important;
    position: absolute !important;
    left: 20px !important;
    right: auto !important;
    top: 16px !important;
    /* Perfectly centered with the text line */
    transform: rotate(0deg) !important;
    transition: transform 0.3s ease-in-out !important;
    opacity: 0.7 !important;
}

[data-textdirection="rtl"] .main-menu.menu-dark .navigation>li.has-sub.open>a:after {
    transform: rotate(-90deg) !important;
}

/* Prevent chevrons on child items */
[data-textdirection="rtl"] .main-menu.menu-dark .navigation li:not(.has-sub)>a:after {
    display: none !important;
}

input[type="checkbox"] {
    width: 1.0em;
    height: 1.0em;
}

#myTable td,
#myTable th {
    vertical-align: middle
}

#statusLabel {
    margin-top: 35px;
    font-size: 13px
}

#statusLabel span {
    padding: 0 10px;
}


table.dataTable td,
th {
    font-size: 0.92em;
}

.page-item.disabled .page-link {
    background-color: #fff !important;
    color: #ced4da !important;
    border-color: #f0f2f5 !important;
    pointer-events: none !important;
    font-size: 0.85rem !important;
}

/* Premium Global Pagination Style - LTR */
.pagination {
    margin-top: 1.5rem !important;
}

.page-item .page-link {
    border: 1px solid #f0f2f5 !important;
    margin: 0 4px !important;
    padding: 10px 18px !important;
    border-radius: 2px !important;
    color: #495057 !important;
    font-weight: 500 !important;
    background-color: #fff !important;
    transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-size: 0.9rem !important;
}

.page-item.active .page-link {
    background-color: #1e9ff2 !important;
    /* Primary project color */
    border-color: #1e9ff2 !important;
    color: #fff !important;
    box-shadow: 0 5px 15px rgba(30, 159, 242, 0.35) !important;
}

.page-item .page-link:hover {
    background-color: #f8f9fa !important;
    border-color: #1e9ff2 !important;
    transform: translateY(-2px) !important;
}


.note-editor.is-invalid-summernote-editor {
    border: 1px solid #dc3545 !important;
}

.note-editor.is-invalid-summernote-editor {
    border: 1px solid #dc3545 !important;
}

.table-image {
    width: 70px;
    height: 60px;
    border-radius: 2px;
}


/* btn Style */
.btn {
    padding: 0.60rem 1rem;
    line-height: 1.1;
}

html[data-textdirection="rtl"] .btn {
    font-size: 1.075rem;
}

html[data-textdirection="ltr"] .btn {
    font-size: 0.9rem;
}

.badge-sm {
    font-size: 0.7rem;
}

.badge-premium-lg {
    font-size: 1.1rem !important;
}

.bg-indigo-alt {
    background-color: #1F3BB3 !important;
}

.min-w-140 {
    min-width: 140px !important;
}

.min-w-300 {
    min-width: 300px !important;
}

.w-100 {
    width: 100% !important;
}

.w-150 {
    width: 150px !important;
}

.p-inline-20 {
    padding-inline: 8px !important;
}

.avatar-size-80 {
    width: 80px !important;
    height: 80px !important;
}

.radius-15 {
    border-radius: 6px !important;
}

.radius-top-15 {
    border-top-left-radius: 15px !important;
    border-top-right-radius: 15px !important;
}

.overflow-hidden {
    overflow: hidden !important;
}

.v-align-middle {
    vertical-align: middle !important;
}

.min-w-120 {
    min-width: 18px !important;
}

.min-w-250 {
    min-width: 250px !important;
}

.max-h-250 {
    max-height: 250px !important;
}

.overflow-y-auto {
    overflow-y: auto !important;
}

/* Positioning & Layering */
.z-index-10001 {
    z-index: 10001 !important;
}

.pos-top-5 {
    top: 5px !important;
}

.pos-inset-start-02 {
    inset-inline-start: 2px !important;
}

.premium-status-badge {
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    font-weight: bold !important;
    padding: 5px 8px !important;
}

.premium-badge-pill-md {
    font-size: 11px !important;
    width: 35px !important;
    height: 18px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Premium Button Variations */
.btn-premium-reset {
    border-radius: 2px !important;
    padding: 8px 15px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
}

.btn-premium-excel {
    border-radius: 2px !important;
    padding: 8px 15px !important;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.2) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
}

/* Premium Layout Utilities */
.h-42 {
    height: 42px !important;
}

.radius-8 {
    border-radius: 6px !important;
}

.radius-10 {
    border-radius: 2px !important;
}

.radius-12 {
    border-radius: 6px !important;
}

.radius-16 {
    border-radius: 6px !important;
}

.radius-20 {
    border-radius: 6px !important;
}

/* Font Utilities */
.font-10 {
    font-size: 10px !important;
}

.font-11 {
    font-size: 11px !important;
}

.font-12 {
    font-size: 0.95rem !important;
    font-weight: 800 !important;
}

.font-24 {
    font-size: 24px !important;
}

.font-40 {
    font-size: 40px !important;
}

/* Premium Semantic Components */
.premium-card-header-alt {
    background-color: #fcfcfc !important;
    border-bottom: 1px solid #f0f2f5 !important;
}

.premium-popover-panel {
    min-width: 280px;
    border-radius: 2px !important;
}

.premium-section-title {
    background-color: #f8fafc;
    padding: 12px 20px !important;
    margin-bottom: 1.5rem !important;
    border-radius: 2px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    color: #1e293b !important;
    border: 1px solid #eef2f7 !important;
}

.premium-section-title i {
    font-size: 1.4rem !important;
    color: #1e9ff2 !important;
    filter: drop-shadow(0 2px 4px rgba(30, 159, 242, 0.2));
}

.premium-section-title-blue {
    border-inline-end: 5px solid #1e9ff2;
}

.premium-section-title-green {
    border-inline-end: 4px solid #28d094;
}

.premium-switch-box {
    border-radius: 6px;
    border: 1px solid #f0f2f5;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.premium-switch-label {
    font-size: 1rem;
    font-weight: 600;
    color: #404e67;
}

/* form controller Style */

.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.975rem;
    font-weight: 400;
    line-height: 1.4rem;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #e2e8f0;
    appearance: none;
    border-radius: 6px;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}


.text-danger {
    font-size: 13px;
}

html[data-textdirection="ltr"] .text-danger {
    font-size: 11px;
}

.form-control {
    font-size: 1.025rem;
}

html[data-textdirection="ltr"] .form-control {
    font-size: 0.85rem !important;
}

html body a {
    color: #59597e;
    font-weight: bolder
}

label {
    display: inline-block;
    margin-bottom: .5rem;
    font-weight: 600 !important;
    color: #334155 !important;
}

html[data-textdirection="rtl"] label {
    font-size: 1.1rem !important;
}

html[data-textdirection="ltr"] label {
    font-size: 0.95rem !important;
}

.main-menu.menu-dark .navigation li a {
    color: #dcdcdc;
    padding: 10px 20px !important;
    /* Adjusted for better balance */
    margin: 2px 0 !important;
    /* Subtle breathing room */
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    font-size: 1.025rem;
    font-weight: 500 !important;
}

html body .la {
    font-size: 1.0rem;
}

/* Avatar Utilities */
.avatar-gray-bg {
    background-color: #f8fafc !important;
}

.avatar-gradient-bg {
    background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%) !important;
}

.avatar-img-fit {
    object-fit: cover !important;
    width: 100% !important;
    height: 100% !important;
    transition: transform 0.15s ease;
}

.avatar-circle {
    border-radius: 50% !important;
    overflow: hidden !important;
}

.avatar-size-40 {
    width: 40px !important;
    height: 40px !important;
}

.avatar-size-50 {
    width: 50px !important;
    height: 50px !important;
}

.avatar-size-60 {
    width: 60px !important;
    height: 60px !important;
}

.avatar-size-100 {
    width: 100px !important;
    height: 100px !important;
}

.avatar-initials {
    display: inline-flex !important;
    align-items: center !important;

    color: #ffffff !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    background-color: #6366f1 !important;
}

.font-45 {
    font-size: 45px !important;
}

.nav.nav-tabs.nav-underline {
    background: transparent;
    position: relative;
    border-bottom: 1px solid #1E9FF2;
}

.strong-weight {
    font-size: 8px;
    font-weight: bolder;
}

.table-container {
    position: relative;
}

#loading-indicator {
    font-size: 15px;
    font-weight: bolder;
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    background-color: rgba(117, 112, 112, 0.8);
    padding: 8px;
    border-radius: 5px;
    color: white
}

/* Premium Spinner Styling */
.spinner_loading {
    vertical-align: middle !important;
}

/* Removed broken max-height constraints */
.note-editable,
.note-code {
    height: 400px;
    min-height: 400px;
}

.font-boder {
    font-weight: 700;
    font-size: 1rem;
}


/* SweetAlert Global Premium Styling - Unified Snappy Animation */
.swal-footer {
    display: flex !important;
    flex-direction: row-reverse !important;
    justify-content: center !important;
    padding: 20px !important;
    gap: 12px !important;
    margin-top: 5px !important;
}

.swal-overlay {
    background-color: rgba(15, 23, 42, 0.4) !important;
    transition: opacity 0.02s linear !important;
}

.swal-modal {
    border-radius: 2px !important;
    animation: none !important;
    transform: scale(0.99) !important;
    opacity: 0 !important;
    transition: transform 0.02s linear, opacity 0.02s linear !important;
    will-change: transform, opacity;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.1) !important;
}

.swal-overlay--show-modal .swal-modal {
    transform: scale(1) !important;
    opacity: 1 !important;
}

.swal-button-container {
    margin: 0 !important;
}

/* Prevent scrollbar flicker/appearance when Swal is open */
body.stop-scrolling {
    height: auto !important;
    overflow: hidden !important;
}

.swal-overlay {
    overflow-y: auto !important;
    /* Allow scroll only if content is huge, but hide by default */
}

.swal-overlay--show-modal {
    overflow-x: hidden !important;
    overflow-y: hidden !important;
}

/* Premium Global Header & Body Styling */
.content-body .card {
    border-radius: 2px !important;
    overflow: visible !important;
    border: none !important;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.04) !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.content-body .card-header {
    border-bottom: 1px solid #f8f9fa !important;
    background-color: #fff !important;
    padding: 1.5rem 1.5rem 0.5rem !important;
}

/* Premium Global Table Style - LTR */
.table {
    border-collapse: separate !important;
    border-spacing: 0 2px !important;
    margin-bottom: 2rem !important;
    background: transparent !important;
}

.table thead th {
    background-color: #f8f9fa !important;
    color: #495057 !important;
    font-weight: 700 !important;
    border-top: none !important;
    border-bottom: 2px solid #e9ecef !important;
    padding: 8px 15px !important;
}

html[data-textdirection="rtl"] .table thead th {
    font-size: 1.05rem !important;
}

html[data-textdirection="ltr"] .table thead th {
    font-size: 0.95rem !important;
}

.table tbody tr {
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease, opacity 0.25s ease !important;
    background-color: #fff !important;
}

.table tbody tr:hover {
    background-color: #fcfcfc !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05) !important;
    transform: scale(1.002);
}

.table tbody td {
    padding: 14px 15px !important;
    vertical-align: middle !important;
    border-top: 1px solid #f1f3f5 !important;
    color: #555 !important;
}

html[data-textdirection="rtl"] .table tbody td {
    font-size: 1.125rem !important;
}

html[data-textdirection="ltr"] .table tbody td {
    font-size: 0.85rem !important;
}

/* Responsive Table Container Styling */
.table-responsive {
    border-radius: 2px !important;
    overflow: hidden !important;
}

.modal-pop.fade .modal-dialog {
    transform: translateY(-20px) !important;
    opacity: 0 !important;
    transition: transform 0.2s ease-out, opacity 0.2s linear !important;
}

.modal-pop.show .modal-dialog {
    transform: translateY(0) !important;
    opacity: 1 !important;
}

/* Modal Header LTR Fix */
.modal-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 1.5rem 1.5rem 0.5rem !important;
}

.modal-header .close {
    margin: 0 !important;
    padding: 1rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.25s ease !important;
    outline: none !important;
}

.premium-modal-close:hover {
    color: #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.05) !important;
    border-radius: 50% !important;
    transform: scale(1.1);
}

/* Instant Backdrop */
.modal-backdrop.fade {
    opacity: 0;
    transition: opacity 0.02s linear !important;
}

/* Minimalist Modal Styling */
.modal-content {
    border: none !important;
    border-radius: 2px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    background-color: #ffffff !important;
}

/* Global Navbar Alignment Fix - Safer Vertical Centering */
.header-navbar,
.header-navbar .navbar-wrapper,
.header-navbar .navbar-header,
.header-navbar .navbar-header.expanded,
.header-navbar .navbar-container {
    background-color: #ffffff !important;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
}

.header-navbar .navbar-header {
    width: 260px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 1rem !important;
    transition: all 0.3s ease !important;
}

[dir="rtl"] .header-navbar .navbar-header,
html[dir="rtl"] .header-navbar .navbar-header {
    justify-content: center !important;
    padding: 0 1rem !important;
}

.navbar-container.content {
    border-left: none !important;
    border-right: none !important;
}

.navbar-container .navbar-nav.float-right {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    height: 60px !important;
}

/* Scoped to desktop to prevent mobile interference */
@media (min-width: 768px) {
    html[dir="rtl"] .navbar-container .navbar-nav.float-right {
        position: absolute !important;
        left: 15px !important;
        right: auto !important;
        top: 0 !important;
        height: 60px !important;
        flex-direction: row-reverse !important;
        margin: 0 !important;
    }
}

/* Force Right for Logo in RTL */
html[dir="rtl"] .header-navbar .navbar-header {
    position: absolute !important;
    right: 0 !important;
    left: auto !important;
    top: 0 !important;
    height: 60px !important;
}

/* Allow centering on mobile by removing !important */
.navbar-collapse,
.navbar-container {
    justify-content: flex-start;
    text-align: left;
}


/* Premium Language Switcher - Glassmorphism Style */
.language-switcher-premium {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255, 255, 255, 0.82);
    /* Sharper and more visible */
    padding: 4px 14px;
    /* Slightly reduced padding to match system height */
    border-radius: 50px;
    transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0,
            0.2, 1), opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    height: 40px !important;
    /* Standard height for navbar capsules */
    margin: 0 10px;
}

.language-switcher-premium:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border-color: #fff;
}

.language-switcher-premium .flag-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 2px solid #fff;
}

.language-switcher-premium .lang-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #444;
    margin: 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Premium User Pill - Navbar (Refined & Distinct) */
.premium-user-pill {
    display: flex;
    align-items: center;
    background: transparent;
    /* Transparent background for a cleaner look */
    border: none;
    /* Removed border as requested */
    padding: 2px 10px;
    /* Reduced vertical padding to match other items */
    border-radius: 6px;
    /* Less rounded for more corporate feel */
    transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0,
            0.2, 1), opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    height: 44px !important;
    /* Fixed height to match other navbar items */
}

.premium-user-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}



.avatar-wrapper-premium {
    position: relative;
    display: flex;
}

.avatar-img-premium,
.avatar-initials-premium {
    width: 42px;
    /* Slightly larger for presence */
    height: 42px;
    border-radius: 2px;
    /* Matching the card radius */
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.avatar-initials-premium {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
}

.avatar-status-online {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #10b981;
    border: 2px solid #fff;
    border-radius: 50%;
    z-index: 2;
}

.chevron-icon {
    font-size: 0.8rem !important;
    color: #94a3b8;
    transition: transform 0.15s ease;
}

.dropdown.show .chevron-icon {
    transform: rotate(180deg);
}

/* Dark Navbar Support */
.header-navbar.navbar-semi-dark .premium-user-pill {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.header-navbar.navbar-semi-dark .user-name-text {
    color: #f8fafc;
}

.header-navbar.navbar-semi-dark .greeting-text {
    color: #64748b;
}

.header-navbar.navbar-semi-dark .avatar-img-premium,
.header-navbar.navbar-semi-dark .avatar-initials-premium {
    border-color: #334155;
}

/* Dark Navbar adjustments */
.header-navbar.navbar-semi-dark .language-switcher-premium .lang-name {
    color: #fff;
}

.header-navbar.navbar-semi-dark .language-switcher-premium {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}

.modal-header {
    border-bottom: none !important;
    padding: 1.25rem 1.5rem 0.5rem 1.5rem !important;
    background-color: transparent !important;
}

.modal-footer {
    border-top: none !important;
    padding: 0.5rem 1.5rem 1.25rem 1.5rem !important;
    background-color: transparent !important;
}

.modal-body {
    padding: 0.5rem 1.5rem !important;
}

.modal .form-group {
    margin-bottom: 0.8rem !important;
}

.modal .row {
    margin-bottom: 0.2rem !important;
}

.modal-title {
    font-weight: 800 !important;
    color: #1a1a1a !important;
    font-size: 1.25rem !important;
    letter-spacing: -0.5px;
}

/* Ensure backdrop is subtle */
.modal-backdrop.show {
    opacity: 0.4 !important;
}

/* ==========================================================================
Premium Role Switch Toggle & Permission Cards
========================================================================== */
.permission-group-card {
    border-radius: 2px !important;
    border: none !important;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, .04) !important;
    overflow: hidden;
    height: 100%;
    background: #fff;
    margin-bottom: 2rem;
}

.permission-group-header {
    background: #fcfcfc;
    padding: 15px 8px;
    border-bottom: 1px solid #f1f3f5;
    display: flex;
    align-items: center;
    gap: 8px;
}

.permission-group-header i {
    font-size: 1.3rem;
    color: #1e9ff2;
}

.permission-group-header h5 {
    margin: 0;
    font-weight: 700;
    color: #404e67;
    font-size: 1rem;
    letter-spacing: -0.2px;
}

.premium-switch-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 8px;
    border-bottom: 1px solid #f8f9fa;
    transition: background 0.2s ease;
}

.premium-switch-item:last-child {
    border-bottom: none;
}

.premium-switch-item:hover {
    background: #fafafa;
}

.premium-switch-item .switch-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555e6d;
}

/* ==========================================================================
   ULTRA PREMIUM MODERN SWITCH (LTR & RTL SUPPORTED)
   ========================================================================== */
:root {
    --sw-width: 38px;
    --sw-height: 20px;
    --sw-handle: 16px;
    --sw-pad: 2px;
    --sw-travel: calc(var(--sw-width) - var(--sw-handle) - (var(--sw-pad) * 2));
    --sw-active: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    --sw-inactive: #e2e8f0;
}

/* ==========================================================================
   ULTRA-ROBUST GLOBAL SWITCH (FORCED DIMENSIONS)
   ========================================================================== */
:root {
    --sw-w: 38px !important;
    --sw-h: 20px !important;
    --sw-s: 16px !important;
    --sw-p: 2px !important;
    --sw-move: 16px !important;
    --sw-move-rtl: -16px !important;
}

.modern-switch {
    position: relative !important;
    display: inline-block !important;
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 20px !important;
    vertical-align: middle !important;
    flex: none !important;
    /* Prevent flex stretching */
}

.modern-switch input {
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
}

.modern-slider {
    position: absolute !important;
    cursor: pointer !important;
    inset: 0 !important;
    background-color: #e2e8f0 !important;
    transition: all 0.2s ease-out !important;
    border-radius: 34px !important;
    width: 38px !important;
}

.modern-slider:before {
    position: absolute !important;
    content: "" !important;
    height: 16px !important;
    width: 16px !important;
    left: 2px !important;
    bottom: 2px !important;
    background-color: white !important;
    transition: all 0.2s ease-out !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* RTL Handle Positions */
[data-textdirection="rtl"] .modern-slider:before,
[dir="rtl"] .modern-slider:before {
    left: auto !important;
    right: 2px !important;
}

/* Checked State Animations */
input:checked+.modern-slider {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
}

input:checked+.modern-slider:before {
    transform: translateX(16px) !important;
}

[data-textdirection="rtl"] input:checked+.modern-slider:before,
[dir="rtl"] input:checked+.modern-slider:before {
    transform: translateX(-16px) !important;
}

/* 2. Global Bootstrap Custom Switch Override (Strict) */
.custom-switch {
    padding-left: 0 !important;
    padding-right: 0 !important;
    display: inline-block !important;
    width: 38px !important;
    min-width: 38px !important;
}

.custom-switch .custom-control-input~.custom-control-label:before {
    height: 20px !important;
    width: 38px !important;
    border-radius: 34px !important;
    background-color: #e2e8f0 !important;
    border: none !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    transition: all 0.2s ease-out !important;
}

.custom-switch .custom-control-input~.custom-control-label:after {
    width: 16px !important;
    height: 16px !important;
    background-color: white !important;
    border-radius: 50% !important;
    top: 2px !important;
    left: 2px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s ease-out !important;
}

[data-textdirection="rtl"] .custom-switch .custom-control-input~.custom-control-label:after,
[dir="rtl"] .custom-switch .custom-control-input~.custom-control-label:after {
    left: auto !important;
    right: 2px !important;
}

.custom-switch .custom-control-input:checked~.custom-control-label:before {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
}

.custom-switch .custom-control-input:checked~.custom-control-label:after {
    transform: translateX(16px) !important;
}

[data-textdirection="rtl"] .custom-switch .custom-control-input:checked~.custom-control-label:after,
[dir="rtl"] .custom-switch .custom-control-input:checked~.custom-control-label:after {
    transform: translateX(-16px) !important;
}

/* Premium Disabled State for Switches */
.modern-switch input:disabled+.modern-slider {
    background-color: #f1f5f9 !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

.modern-switch input:checked:disabled+.modern-slider {
    background-color: #94d3ff !important;
}

.modern-switch input:disabled+.modern-slider:before {
    background-color: #f8fafc;
    box-shadow: none;
}

/* Premium Disabled State for Inputs */
.form-control:disabled,
.form-control[readonly] {
    background-color: #fcfcfc !important;
    color: #94a3b8 !important;
    border-color: #e2e8f0 !important;
    cursor: not-allowed !important;
    opacity: 0.8;
}


/* ==========================================================================
Premium Save Button & Spinner Animation
========================================================================== */
/* Premium Buttons Base */
.btn-premium-save,
.btn-premium-add,
.btn-premium-blue,
.btn-premium-cancel {
    border: none !important;
    border-radius: 2px !important;
    padding: 10px 24px !important;
    color: #fff !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;

    gap: 4px !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease !important;
    height: 42px !important;
    cursor: pointer;
    text-decoration: none !important;
}

/* Professional Save/Update Button (Vibrant Blue) */
.btn-premium-save,
.btn-premium-blue {
    background: #1e9ff2 !important;
    box-shadow: 0 4px 8px rgba(30, 159, 242, 0.2) !important;
}

.btn-premium-save:hover,
.btn-premium-blue:hover {
    background: #168ad4 !important;
    box-shadow: 0 6px 15px rgba(30, 159, 242, 0.3) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

/* Premium Add Button (Sophisticated Indigo) */
.btn-premium-add {
    background: #7367f0 !important;
    box-shadow: 0 4px 10px rgba(115, 103, 240, 0.15) !important;
}

.btn-premium-add:hover {
    background: #5e50ee !important;
    box-shadow: 0 6px 15px rgba(115, 103, 240, 0.25) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

/* Premium Cancel/Close Button (Neutral/Elegant Grey) */
.btn-premium-cancel {
    background: #f1f5f9 !important;
    color: #475569 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05) !important;
}

.btn-premium-cancel:hover {
    background: #e2e8f0 !important;
    color: #1e293b !important;
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-1px);
}

.btn-premium-save i,
.btn-premium-add i,
.btn-premium-blue i,
.btn-premium-cancel i {
    font-size: 1.25rem !important;
    line-height: 1;
}

/* Spinner fix: remove display override */
.spinner_loading {
    animation: spin-premium 1.2s linear infinite;
}

@keyframes spin-premium {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
Premium Navbar Components (Notifications, Messages, User Dropdown)
========================================================================== */

.navbar-dropdown {
    border: none !important;
    border-radius: 2px !important;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15) !important;
    padding: 10px !important;
    min-width: 240px !important;
    margin-top: 15px !important;
    background: #fff !important;
    animation: dropdownPopFade 0.15s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes dropdownPopFade {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }

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

.dropdown-header-premium {
    padding: 20px 15px !important;
    border-radius: 2px !important;
    background: linear-gradient(135deg, #f8faff 0%, #f1f4ff 100%) !important;
    margin-bottom: 2px !important;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.dropdown-header-premium .user-name {
    display: block;
    font-weight: 800 !important;
    color: #0f172a !important;
    font-size: 1.15rem !important;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.dropdown-header-premium .user-email {
    display: block;
    font-size: 0.825rem !important;
    color: #64748b !important;
    font-weight: 500;
    opacity: 0.85;
}

.premium-dropdown-item {
    padding: 6px 18px !important;
    border-radius: 2px !important;
    display: flex !important;
    align-items: center !important;
    color: #475569 !important;
    font-weight: 600 !important;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1) !important;
    border: none !important;
    background: transparent !important;
}

.dropdown-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid !important;
    place-items: center !important;
    flex-shrink: 0 !important;
    margin-right: 20px !important;
    direction: ltr !important;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.dropdown-icon-wrapper i {
    font-size: 1.25rem !important;
    color: inherit;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    direction: ltr !important;
}

/* Soft Color Utilities */
.bg-soft-primary {
    background-color: #e0f2fe !important;
    color: #0ea5e9 !important;
}

.bg-soft-warning {
    background-color: #fef3c7 !important;
    color: #d97706 !important;
}

.bg-soft-danger {
    background-color: #fee2e2 !important;
    color: #ef4444 !important;
}

.premium-dropdown-item:hover {
    background-color: #f8fafc !important;
    color: #0f172a !important;
    padding-left: 22px !important;
}

.premium-dropdown-item:hover .dropdown-icon-wrapper {
    transform: scale(1.05);
    background-color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.premium-dropdown-item:hover i {
    transform: scale(1.1);
}

.premium-dropdown-item.logout-item:hover {
    background-color: #fff1f1 !important;
}

.premium-dropdown-item.logout-item {
    color: #ef4444 !important;
}

/* Premium Preview List (Notifications & Messages) */
.navbar-dropdown.preview-list {
    min-width: 350px !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.dropdown-divider {
    margin: 4px 0 !important;
    opacity: 0.08 !important;
}




.dropdown-header-main {
    padding: 15px 8px !important;
    display: flex !important;
    align-items: center !important;

    background: #fff !important;
    border-bottom: 1px solid #f1f4f9 !important;
}

.dropdown-header-main .header-title {
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    color: #1a1f26 !important;
    margin: 0 !important;
}

.premium-badge-count {
    background: rgba(99, 102, 241, 0.1) !important;
    color: #6366f1 !important;
    padding: 3px 10px !important;
    border-radius: 2px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
}

.preview-item-premium {
    padding: 15px 8px !important;
    display: flex !important;
    align-items: flex-start !important;
    border-bottom: 1px solid #f1f4f9 !important;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease !important;
    text-decoration: none !important;
    background: #fff !important;
}

.preview-item-premium:hover {
    background: #f9faff !important;
}

.preview-item-premium:last-child {
    border-bottom: none !important;
}

.preview-thumbnail-premium {
    width: 38px !important;
    height: 38px !important;
    border-radius: 2px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    margin-right: 15px !important;
    flex-shrink: 0 !important;
}

.preview-thumbnail-premium i {
    font-size: 1.1rem !important;
    color: #fff !important;
    line-height: 38px !important;
    display: block !important;
    text-align: center !important;
    margin: 0 !important;
}

.preview-item-content-premium {
    flex-grow: 1 !important;
    overflow: hidden !important;
}

.preview-item-content-premium .subject {
    display: block !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: #1a1f26 !important;
    margin-bottom: 3px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.preview-item-content-premium .message-text {
    display: block !important;
    font-size: 0.8rem !important;
    color: #64748b !important;
    margin-bottom: 5px !important;
    line-height: 1.4 !important;
}

.preview-item-content-premium .time {
    display: block !important;
    font-size: 0.7rem !important;
    color: #94a3b8 !important;
    font-weight: 500 !important;
}

.dropdown-footer-premium {
    padding: 8px !important;
    text-align: center !important;
    background: #f8faff !important;
    border-top: 1px solid #f1f4f9 !important;
}

.dropdown-footer-premium a {
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    color: #6366f1 !important;
    text-decoration: none !important;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease !important;
}

.dropdown-footer-premium a:hover {
    color: #4f46e5 !important;
}

/* RTL Support */
[data-textdirection="rtl"] .premium-dropdown-item:hover {
    /* Padding shift removed */
}

[data-textdirection="rtl"] .premium-dropdown-item i {
    margin-right: 0 !important;
    margin-left: 8px !important;
}

[data-textdirection="rtl"] .preview-item-premium {
    /* flex-direction: row-reverse !important; */
    text-align: right !important;
}

[data-textdirection="rtl"] .preview-thumbnail-premium {
    margin-right: 0 !important;
    margin-left: 15px !important;
}

[data-textdirection="rtl"] .preview-item-content-premium {
    text-align: right !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .navbar-dropdown {
        min-width: 280px !important;
    }

    .preview-item-premium {
        padding: 10px 15px !important;
    }
}

/* ==========================================================================
Premium Messages Center
========================================================================== */

.msg-sidebar-card {
    border: none !important;
    border-radius: 2px !important;
    background: #fff !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04) !important;
    overflow: hidden !important;
    min-height: 600px !important;
}

.msg-sidebar-btn {
    padding: 8px !important;
    border-radius: 2px !important;
    font-weight: 700 !important;
    font-size: 1.2rem !important;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3) !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease !important;
}

.msg-sidebar-btn i {
    margin-right: 6px !important;
}

[data-textdirection="rtl"] .msg-sidebar-btn i {
    margin-right: 0 !important;
    margin-left: 6px !important;
}

.msg-sidebar-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 15px rgba(99, 102, 241, 0.4) !important;
    color: #fff !important;
}

.msg-nav-link {
    padding: 8px 8px !important;
    margin: 6px 15px !important;
    border-radius: 2px !important;
    color: #475569 !important;
    font-weight: 600 !important;
    font-size: 1.1rem !important;
    transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    align-items: center !important;
    border: 1px solid transparent !important;
    position: relative;
    text-decoration: none !important;
}

.msg-nav-link:hover {
    background: rgba(99, 102, 241, 0.04) !important;
    color: #4f46e5 !important;
    transform: translateX(5px);
}

.msg-nav-link.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.08) 0%, rgba(255, 255, 255, 0) 100%) !important;
    color: #4338ca !important;
    border-left: 3px solid #6366f1 !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.02);
}

/* Icon Colors & Animations */
.msg-nav-link i {
    font-size: 1.3rem !important;
    margin-right: 8px !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease !important;
}

.msg-nav-link[wire\:click*="inbox"] i {
    color: #6366f1 !important;
}

.msg-nav-link[wire\:click*="sent"] i {
    color: #0ea5e9 !important;
}

.msg-nav-link[wire\:click*="starred"] i {
    color: #f59e0b !important;
}

.msg-nav-link[wire\:click*="trash"] i {
    color: #f43f5e !important;
}

.msg-nav-link:hover i {
    transform: scale(1.2);
}

.msg-main-card {
    border: none !important;
    border-radius: 2px !important;
    background: #fff !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04) !important;
    min-height: 600px !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.msg-card-header-premium {
    padding: 8px 25px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    background: #fff !important;
    border-top-left-radius: 8px !important;
    border-top-right-radius: 8px !important;
}

.msg-count-badge {
    background: #f1f5f9 !important;
    color: #64748b !important;
    padding: 2px 10px !important;
    border-radius: 2px !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease !important;
}

.msg-nav-link.active .msg-count-badge {
    background: #6366f1 !important;
    color: #fff !important;
}

.msg-badge-new {
    background: #6366f1 !important;
    color: #fff !important;
    padding: 2px 8px !important;
    border-radius: 2px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
}

.msg-star {
    color: #cbd5e1 !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease !important;
    font-size: 1.25rem !important;
}

.msg-star.starred {
    color: #f59e0b !important;
}

.msg-star:hover {
    transform: scale(1.1) !important;
}

.message-meta-box {
    background: #f8fafc !important;
    padding: 15px !important;
    border-radius: 2px !important;
    border: 1px solid #f1f5f9 !important;
}

.message-body-content {
    background: #fff !important;
    padding: 25px !important;
    border-radius: 2px !important;
    border: 1px solid #f1f5f9 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02) !important;
    line-height: 1.8 !important;
    color: #334155 !important;
}

/* RTL Support for Messages */
[data-textdirection="rtl"] .msg-nav-link i {
    margin-right: 0 !important;
    margin-left: 6px !important;
}

[data-textdirection="rtl"] .msg-badge-new {
    margin-left: 0 !important;
    margin-right: 8px !important;
}

/* Message Center UI Utilities */
.col-w-45 {
    width: 45px !important;
}

.col-w-80 {
    width: 80px !important;
}

.col-w-120 {
    width: 18px !important;
}

.col-w-150 {
    width: 150px !important;
}

.col-w-200 {
    width: 200px !important;
}

.col-max-200 {
    max-width: 200px !important;
}

.avatar-icon-box-md {
    width: 50px !important;
    height: 50px !important;
}

.empty-state-icon-lg {
    font-size: 5rem !important;
}

.recipients-list-container {
    max-height: 48px;
}

.pt-11px {
    padding-top: 11px !important;
}

/* Compose Modal Redesign Styles (Migrated) */
.compose-row-container {
    min-height: 58px;
    border-radius: 6px;
}

.bg-premium-sidebar {
    background: linear-gradient(180deg, #f8faff 0%, #ffffff 100%);
}

.main-form-area {
    background: #ffffff;
}

.text-indigo-dark {
    color: #4338ca;
}

.text-dark-blue {
    color: #1e293b;
}

.text-muted-2 {
    color: #94a3b8;
}

.bg-indigo {
    background-color: #6366f1;
}

.text-indigo {
    color: #6366f1;
}

.glass-header {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.glass-footer {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
}

.premium-search-bar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
}

.premium-search-bar:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1) !important;
}

.premium-input-wrapper,
.premium-textarea-wrapper {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    height: 42px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    padding: 0 !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    /* Thinner border like Properties */
    border-radius: 4px !important;
    /* Slightly softer radius */
    transition: all 0.2s ease !important;
}

.premium-input-wrapper:focus-within {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
    /* Softer glow */
}

/* Remove inner borders to prevent double-bordering */
.premium-input-wrapper .premium-input,
.premium-input-wrapper .form-control,
.premium-input-wrapper .select2-container--default .select2-selection--single {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    height: 100% !important;
    width: 100% !important;
}

.form-group-premium:focus-within .premium-input-wrapper,
.form-group-premium:focus-within .premium-textarea-wrapper {
    border-color: #6366f1;
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.08), 0 4px 6px -2px rgba(99, 102, 241, 0.05) !important;
    transform: translateY(-1px);
}

.recipient-card {
    background: #ffffff;
    border: 1px solid transparent !important;
    padding: 10px 15px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    margin-bottom: 8px;
}

.recipient-card.card-selected {
    background: #f0f4ff !important;
    border-color: #c7d2fe !important;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.08);
}

.recipient-card.card-selected::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #6366f1;
    border-radius: 4px 0 0 4px;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.85rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    background-color: var(--avatar-bg, #6366f1);
    margin: auto;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.premium-broadcast-box {
    background: linear-gradient(135deg, #f8faff 0%, #eff6ff 100%);
    border-radius: 6px;
    padding: 24px !important;
    border: 1px dashed #bfdbfe;
    transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.premium-broadcast-box:has(.custom-control-input:checked) {
    background: linear-gradient(135deg, #f0f4ff 0%, #e0e7ff 100%) !important;
    border-color: #6366f1 !important;
    border-style: solid !important;
    box-shadow: 0 10px 8px -5px rgba(99, 102, 241, 0.15) !important;
    transform: translateY(-2px);
}

.icon-orb {
    width: 44px;
    height: 44px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.broadcast-icon-box {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #6366f1, #3b82f6);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shadow-pulse {
    animation: pulse-indigo 2.5s infinite;
}

@keyframes pulse-indigo {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(99, 102, 241, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

.selection-counter-premium {
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
    border: 1.5px solid #e0e7ff;
    padding: 10px 8px;
    border-radius: 6px;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.border-msg-sidebar {
    border-right: 1px solid #f1f5f9;
}

[dir="rtl"] .border-msg-sidebar,
[data-textdirection="rtl"] .border-msg-sidebar {
    border-right: none;
    border-left: 1px solid #f1f5f9;
}

.btn-premium-send {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border: none;
    color: #ffffff;
    border-radius: 2px;
    padding: 8px 28px;
    transition: background-color 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-premium-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    color: #ffffff;
}

.btn-premium-send:active {
    transform: scale(0.96);
}

.btn-premium-ghost-indigo {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.03);
    border: 1px solid transparent;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.15s, opacity 0.15s;
    border-radius: 2px;
}

.btn-premium-ghost-indigo:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
    color: #4f46e5;
    transform: translateY(-1px);
}

.btn-premium-danger-soft {
    background: #fff1f2;
    color: #e11d48;
    border: 1px solid #ffe4e6;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(225, 29, 72, 0.05);
}

.btn-premium-danger-soft:hover {
    background: #ffe4e6;
    color: #be123c;
    border-color: #fecdd3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(225, 29, 72, 0.1);
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 2px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

.transition-all-300 {
    transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s cubic-bezier(0.4, 0,
            0.2, 1), border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.letter-spacing-2 {
    letter-spacing: 1px;
}

.no-resize {
    resize: none;
}

.scale-110 {
    transform: scale(1.1);
}

.fade-in {
    animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.custom-control-indigo .custom-control-label::before {
    border-radius: 6px;
    border: 2px solid #cbd5e1;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s, opacity 0.2s;
    width: 1.25rem !important;
    height: 1.25rem !important;
}

.custom-control-indigo .custom-control-input:checked~.custom-control-label::before {
    background-color: #6366f1 !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

.custom-control-indigo .custom-control-input:checked~.custom-control-label::after {
    background-image: var(--icon-tick-white) !important;
    background-size: 80% !important;
    width: 1.25rem !important;
    height: 1.25rem !important;
}

.scale-125 {
    transform: scale(1.25);
}

/* LTR Specific Adjustments (English +2px) */
[dir="ltr"] .compose-modern-form,
[data-textdirection="ltr"] .compose-modern-form {
    font-size: 1.1rem;
}

[dir="ltr"] .premium-search-bar input,
[data-textdirection="ltr"] .premium-search-bar input {
    font-size: 1.15rem !important;
}

[dir="ltr"] .recipient-card span,
[data-textdirection="ltr"] .recipient-card span {
    font-size: 1.1rem !important;
}

[dir="ltr"] .recipient-card small,
[data-textdirection="ltr"] .recipient-card small {
    font-size: 0.9rem !important;
}

[dir="ltr"] .form-label,
[data-textdirection="ltr"] .form-label {
    font-size: 0.85rem !important;
}

[dir="ltr"] .premium-input:not(textarea),
[data-textdirection="ltr"] .premium-input:not(textarea),
[dir="ltr"] .premium-textarea,
[data-textdirection="ltr"] .premium-textarea {
    font-size: 1.25rem !important;
}

/* Premium Tabs System (Employees Module) */
.premium-tabs-wrapper {
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(15px);
    border-radius: 50px;
    padding: 6px;
    margin: 0 auto 3rem;
    border: 1px solid rgba(99, 102, 241, 0.15);
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.05);
    width: max-content;
    max-width: 100%;
}

.premium-tabs {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px;
}

.premium-tab-item {
    display: block;
}

.premium-tab-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 50px;
    color: #64748b;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none !important;
    transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0,
            0.2, 1), opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    background: transparent;
    border: none;
}

.premium-tab-link i {
    font-size: 1.4rem !important;
    margin-bottom: 0 !important;
    display: inline-block !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.premium-tab-link:hover {
    color: #4338ca;
    background: rgba(99, 102, 241, 0.08);
    transform: translateY(-1px);
}

.premium-tab-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    box-shadow: 0 10px 8px -5px rgba(79, 70, 229, 0.4);
    transform: translateY(-2px);
}

.premium-tab-link.active i {
    color: #ffffff;
    transform: scale(1.1);
}

/* Form Components Upgrade */
.premium-form-group {
    margin-bottom: 2rem;
}

.premium-form-group label {
    font-weight: 800;
    font-size: 0.85rem !important;
    color: #4338ca;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
    display: block;
    opacity: 0.85;
}

.premium-input:not(textarea) {
    height: 42px !important;
    line-height: 42px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    padding: 0 1.25rem !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 2px !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    transition: all 0.15s ease !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    color: #1e293b !important;
}

select.premium-input,
select.form-control.premium-input {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background: #ffffff !important;
    background-image: var(--icon-chevron-indigo) !important;
    background-repeat: no-repeat !important;
    background-position: right 1.25rem center !important;
    /* Arrow on the right in LTR */
    background-size: 1.2rem !important;
    padding-right: 0.75rem !important;
    padding-left: 0.75rem !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 2px !important;
    height: 3rem !important;
    font-size: 1.15rem !important;
    font-weight: 500 !important;
    color: #1e293b !important;
}

input.premium-input:not(textarea) {
    background: #ffffff !important;
    background-image: none !important;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 2px !important;
    height: 3rem !important;
    font-size: 1.15rem !important;
    font-weight: 500 !important;
    color: #1e293b !important;
    line-height: 3rem !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.form-control.premium-input:not(select):not(textarea):not(input) {
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 2px !important;
    height: 3rem !important;
    display: flex !important;
    align-items: center !important;
}

/* Premium File Input Styling (LTR) */
/* ==========================================================================
PREMIUM FILE INPUT (LTR) - ULTIMATE CUSTOM UI
========================================================================== */
.premium-input-wrapper:has(input[type="file"]) {
    position: relative !important;
    overflow: hidden !important;
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 2px !important;
    height: 3rem !important;
    cursor: pointer !important;
}

/* 1. The Real Hidden Input */
.premium-input-wrapper input[type="file"] {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    cursor: pointer !important;
    z-index: 10 !important;
}

/* 2. The Custom 'Button' on the Left for LTR */
.premium-input-wrapper:has(input[type="file"])::after {
    content: "Browse";
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 8rem;
    background: #6366f1;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 1.5rem;
    /* Space for icon */
    font-weight: 600;
    font-size: 0.95rem;
    z-index: 2;
    transition: background 0.15s ease;
}

/* 3. The Custom Placeholder Text (LTR) */
.premium-input-wrapper:has(input[type="file"])::before {
    content: "Choose file...";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 9rem;
    /* Space after the button */
    color: #94a3b8;
    font-size: 1.1rem;
    z-index: 1;
}

/* 4. The Icon (Anchored inside the button) */
html:not([data-textdirection="rtl"]) .premium-input-wrapper:has(input[type="file"]) i {
    position: absolute !important;
    left: 0.8rem !important;
    right: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #ffffff !important;
    z-index: 3 !important;
    font-size: 1.3rem !important;
    pointer-events: none;
}

.premium-input-wrapper:has(input[type="file"]):hover::after {
    background: #4f46e5;
}




input.premium-input[type="file"]:hover::file-selector-button {
    background: #4f46e5 !important;
    transform: scale(1.02);
}



.premium-form-group label {
    color: #334155 !important;
    /* Darker Slate Gray */
    font-weight: 600 !important;
    font-size: 1.15rem !important;
    /* Increased by 2px (Target 15px) */
    text-transform: uppercase !important;
    letter-spacing: 0.025em !important;
    margin-bottom: 0.45rem !important;
    display: block !important;
}

.premium-form-group {
    margin-bottom: 1.25rem !important;
}

/* ==========================================================================
MINIMALIST KRAJEE FILE INPUT BUTTONS (LTR)
========================================================================== */
.file-input .btn-primary,
.file-input .btn-danger {
    height: 40px !important;
    border-radius: 2px !important;
    padding: 0 18px !important;
    display: inline-flex !important;
    align-items: center !important;

    gap: 8px !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease, opacity 0.25s ease !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
}

/* Browse Button - Ghost Style */
.file-input .btn-primary {
    background: rgba(99, 102, 241, 0.06) !important;
    color: #6366f1 !important;
    border-color: rgba(99, 102, 241, 0.1) !important;
}

.file-input .btn-primary:hover {
    background: #6366f1 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* Delete Button - Ghost Style */
.file-input .btn-danger {
    background: rgba(239, 68, 68, 0.06) !important;
    color: #ef4444 !important;
    border-color: rgba(239, 68, 68, 0.1) !important;
    margin-left: 4px !important;
}

.file-input .btn-danger:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* Input Caption (Text area) */
.file-input .input-group>.form-control {
    border-radius: 2px !important;
    height: 40px !important;
    background: transparent !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
    padding: 0 12px !important;
}

.file-input .input-group {
    gap: 4px !important;
    align-items: center !important;
}

.file-input .file-caption-main {
    width: 100% !important;
}

/* ==========================================================================
PREMIUM SELECT FIX (STABLE - LTR)
========================================================================== */
select.premium-input {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: var(--icon-chevron-indigo) !important;
    background-repeat: no-repeat !important;
    background-position: right 1.2rem center !important;
    background-size: 1.1rem !important;
    padding-right: 1.25rem !important;
    padding-left: 1.25rem !important;
    display: block !important;
    width: 100% !important;
}

/* Readonly Styling (LTR) */
.premium-readonly-wrapper {
    background: #f8fafc !important;
    border-color: #f1f5f9 !important;
    color: #475569 !important;
}

.premium-readonly-text {
    font-weight: 700 !important;
    color: #1e293b !important;
    font-size: 1rem !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
}

.modal-footer .btn+.btn {
    margin-left: 8px !important;
}

/* Premium Badge Pill Refinement (LTR) */
.premium-badge-pill-md {
    font-size: 0.85rem !important;
    font-weight: 800 !important;
    padding: 0.45rem 0.8rem !important;
    background: #6366f1 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3) !important;
    border: none !important;
    line-height: 1 !important;
    min-width: 28px !important;
    text-align: center !important;
    margin-left: 10px !important;
}

.filter-chip.active .premium-badge-pill-md {
    background: #ffffff !important;
    color: #6366f1 !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
}

select.premium-input::-ms-expand {
    display: none !important;
}

select.premium-input::after,
select.premium-input::before {
    display: none !important;
    content: none !important;
}

/* Ensure options style is preserved */
select.premium-input,
select.premium-input::picker(select) {
    appearance: base-select !important;
}

select.premium-input::picker(select) {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(99, 102, 241, 0.2) !important;
    border-radius: 2px !important;
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    padding: 8px !important;
    margin-top: 5px !important;
    animation: premium-dropdown-fade 0.15s ease-out !important;
}

select.premium-input option {
    padding: 8px 8px !important;
    border-radius: 2px !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease !important;
    font-weight: 500 !important;
    color: #1e293b !important;
}

@keyframes premium-dropdown-fade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

.premium-input:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.08), 0 4px 6px -2px rgba(99, 102, 241, 0.05) !important;
    transform: translateY(-1px);
}

/* Standardized Premium Input Wrapper (Directional) */
/* --- Standard Premium Input Icons --- */
.premium-input-wrapper {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    overflow: visible !important;
    /* Keep this to prevent shadow clipping */
}

/* When wrapper contains a textarea, auto-height and top-align icon */
.premium-input-wrapper:has(textarea) {
    height: auto !important;
    align-items: flex-start !important;
}

.premium-input-wrapper i {
    display: none !important;
}

/* Icon inside textarea wrapper: pin to top instead of center */
.premium-input-wrapper:has(textarea) i {
    top: 1rem !important;
    transform: none !important;
}

/* Clickable Icons */
.premium-input-wrapper i.pointer {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* LTR Specific (English) */

html[data-textdirection="ltr"] .premium-input-wrapper .premium-input:not(.select2-hidden-accessible) {
    padding: 0 1rem !important;
}

/* RTL Specific (Arabic) */
html[data-textdirection="rtl"] .premium-input-wrapper .premium-input:not(.select2-hidden-accessible) {
    padding: 0 1rem !important;
}






/* ===================================================
Global Textarea Fix inside premium-input-wrapper
Textarea never needs icon offset - apply equal padding always
=================================================== */
.premium-input-wrapper textarea.premium-input,
.premium-input-wrapper.no-icon textarea.premium-input {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    height: auto !important;
    min-height: 90px !important;
    line-height: 1.6 !important;
    resize: vertical !important;
    border: none !important;
    background: transparent !important;
    width: 100% !important;
    font-size: 1.05rem !important;
    display: block !important;
    box-shadow: none !important;
}

.premium-input-wrapper textarea.premium-input::placeholder,
.premium-input-wrapper.no-icon textarea.premium-input::placeholder {
    color: #94a3b8 !important;
    font-size: 0.95rem !important;
    opacity: 1 !important;
}

/* Dual Icon Padding Override */
.premium-input-wrapper:has(.premium-icon-opposite) .premium-input {
    padding-left: calc(2.5rem + 4px) !important;
    padding-right: calc(2.5rem + 4px) !important;
}




[data-textdirection="ltr"] .premium-input-wrapper .premium-input:not(.select2-hidden-accessible):not(textarea),
html:not([data-textdirection="rtl"]) .premium-input-wrapper .premium-input:not(.select2-hidden-accessible):not(textarea) {
    padding-left: calc(2.5rem + 4px) !important;
    /* Padding moved to left for icon + 4px gap */
    padding-right: 1.25rem !important;
    height: 3rem !important;
    /* Unified 48px height */
    border-radius: 2px !important;
}

[data-textdirection="rtl"] .premium-input-wrapper select.premium-input {
    padding-left: 1rem !important;
    padding-right: 2.2rem !important;
}

.premium-input-wrapper i:hover {
    transform: scale(1.1);
}

/* ====================================================================
   🔥 PROFESSIONAL VALIDATION ERROR STATES (NUCLEAR FIX)
   ==================================================================== */
/* We DO NOT apply border/shadow to the wrapper to prevent double-border and clipping.
   We only apply it to the actual input elements inside the invalid wrapper! */

.premium-input-wrapper.is-invalid-premium {
    /* Clear any legacy wrapper borders/shadows that cause clipping */
    border: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
}

/* Target all standard inputs, textareas, and raw selects */
.premium-input-wrapper.is-invalid-premium .premium-input,
.premium-input-wrapper.is-invalid-premium .form-control,
/* Target Select2 Selection specifically */
.premium-input-wrapper.is-invalid-premium .select2-selection,
/* Target File Upload Box */
.premium-file-upload-wrapper.is-invalid-premium .file-drop-zone {
    border: 1px solid #ef4444 !important;
    background-color: #fff5f5 !important;
    /* Soft error background */
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15) !important;
    /* Professional, seamless glow */
    border-radius: 6px !important;
    /* Exactly 6px as requested */
    transition: all 0.2s ease-in-out !important;
    z-index: 10 !important;
    /* Pop above any sibling elements that might clip the shadow */
}

/* Ensure the wrapper's inner elements (like wire:ignore div) don't clip the shadow */
.premium-input-wrapper.is-invalid-premium>div {
    overflow: visible !important;
}

/* Keep the icon red in error state */
.premium-input-wrapper.is-invalid-premium>i {
    color: #ef4444 !important;
}

/* Permissions Grid Validation */
.permissions-grid.is-invalid-premium {
    border: 1.5px solid #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15) !important;
    border-radius: 2px;
    padding: 10px !important;
    background-color: #fff5f5 !important;
}

/* Modal visibility fix */
.modal-body,
.premium-form-group {
    overflow: visible !important;
}

@keyframes premiumShake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

.error-message-premium {
    color: #ef4444;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 0.5rem;
    display: block;
    text-align: inherit;
    animation: premiumSlideDown 0.3s ease-out;
}

html[dir='rtl'] .error-message-premium {
    text-align: right;
}

@keyframes premiumSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* Animations */
.step-content-fade {
    animation: fadeInScale 0.2s ease-out;
}

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

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

/* Photo Upload Preview */
.premium-photo-container {
    padding: 6px 10px;
    background: #f8fafc;
    border-radius: 6px;
    border: 2px dashed #e2e8f0;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.premium-photo-container:hover {
    border-color: #6366f1;
    background: #f1f5f9;
}

.premium-photo-container .btn-primary {
    padding: 0.5rem 1rem !important;
    font-size: 0.85rem !important;
    border-radius: 2px !important;
}

/* Premium Table Action Buttons */
.btn-premium-action {
    width: 38px;
    height: 38px;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    transition: background-color 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.15s cubic-bezier(0.175, 0.885,
            0.32, 1.275), border-color 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.15s cubic-bezier(0.175, 0.885,
            0.32, 1.275), transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.15s cubic-bezier(0.175, 0.885, 0.32,
            1.275) !important;
    border: none !important;
    margin: 0 4px;
}

.btn-premium-action i {
    font-size: 1.15rem !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;

    width: auto !important;
    height: auto !important;
    line-height: 1 !important;
}

.btn-premium-action-edit {
    background: rgba(99, 102, 241, 0.08) !important;
    color: #6366f1 !important;
}

.btn-premium-action-edit:hover {
    background: #6366f1 !important;
    color: #ffffff !important;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 15px rgba(99, 102, 241, 0.3);
}

.btn-premium-action-danger {
    background: rgba(239, 68, 68, 0.08) !important;
    color: #ef4444 !important;
}

.btn-premium-action-danger:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 15px rgba(239, 68, 68, 0.3);
}

.btn-premium-action-info {
    background: rgba(14, 165, 233, 0.08) !important;
    color: #0ea5e9 !important;
}

.btn-premium-action-info:hover {
    background: #0ea5e9 !important;
    color: #ffffff !important;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 15px rgba(14, 165, 233, 0.3);
}

.btn-premium-action-warning {
    background: rgba(245, 158, 11, 0.08) !important;
    color: #f59e0b !important;
}

.btn-premium-action-warning:hover {
    background: #f59e0b !important;
    color: #ffffff !important;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 15px rgba(245, 158, 11, 0.3);
}

.btn-premium-action-success {
    background: rgba(16, 185, 129, 0.08) !important;
    color: #10b981 !important;
}

.btn-premium-action-success:hover {
    background: #10b981 !important;
    color: #ffffff !important;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 15px rgba(16, 185, 129, 0.3);
}

.btn-premium-action-primary {
    background: rgba(139, 92, 246, 0.12) !important;
    color: #8b5cf6 !important;
}

.btn-premium-action-primary:hover {
    background: #8b5cf6 !important;
    color: #ffffff !important;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 15px rgba(139, 92, 246, 0.3);
}

.premium-photo-preview {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #ffffff;
    box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Premium Badge Glow & Light Utilities */
.badge-glow {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.badge-light-primary {
    background-color: rgba(30, 159, 242, 0.12) !important;
    color: #1e9ff2 !important;
}

.badge-light-success {
    background-color: rgba(40, 199, 111, 0.12) !important;
    color: #28c76f !important;
}

.badge-light-danger {
    background-color: rgba(234, 84, 85, 0.12) !important;
    color: #ea5455 !important;
}

.badge-light-warning {
    background-color: rgba(255, 159, 67, 0.12) !important;
    color: #ff9f43 !important;
}

.badge-light-info {
    background-color: rgba(0, 207, 221, 0.12) !important;
    color: #00cfdd !important;
}

.badge-glow-primary {
    box-shadow: 0 0 8px rgba(30, 159, 242, 0.45) !important;
}

.badge-glow-success {
    box-shadow: 0 0 8px rgba(40, 199, 111, 0.45) !important;
}

.badge-glow-danger {
    box-shadow: 0 0 8px rgba(234, 84, 85, 0.45) !important;
}

.badge-glow-warning {
    box-shadow: 0 0 8px rgba(255, 159, 67, 0.45) !important;
}

.badge-glow-info {
    box-shadow: 0 0 8px rgba(0, 207, 221, 0.45) !important;
}

/* Premium Card & Layout Optimizations */
.premium-card {
    border: none !important;
    border-radius: 2px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04), 0 1px 8px rgba(0, 0, 0, 0.02) !important;
    overflow: visible !important;
    background: #ffffff !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

/* .premium-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06) !important;
} */

.premium-card .card-header {
    background: transparent !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 1.5rem 2rem !important;
}

.premium-card .card-title {
    font-weight: 800 !important;
    color: #1e293b !important;
    letter-spacing: -0.025em;
    font-size: 1.25rem !important;
}

/* Premium Table Improvements */
.premium-table {
    border-collapse: separate !important;
    border-spacing: 0 8px !important;
}

.premium-table thead th {
    background-color: #f8fafc !important;
    color: #334155 !important;
    border: none !important;
    padding: 0.8rem 1rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 0.95rem !important;
    letter-spacing: 0.05em;
    vertical-align: middle !important;
}

.premium-table td {
    font-size: 1.1rem !important;
}

html[data-textdirection="rtl"] .premium-table td {
    font-size: 1.3rem !important;
}

html[data-textdirection="rtl"] .premium-table thead th {
    font-size: 1.1rem !important;
}

/* Default alignment for LTR */
.premium-table thead th {
    text-align: left !important;
}

.premium-table thead th.text-center {
    text-align: center !important;
}

/* Alignment for RTL */
html[data-textdirection="rtl"] .premium-table thead th {
    text-align: right !important;
}

html[data-textdirection="rtl"] .premium-table thead th.text-center {
    text-align: center !important;
}

.premium-table th.col-actions-width,
.premium-table td.vertical-middle:last-child {
    text-align: center !important;
    padding-right: 1rem !important;
    /* Standard padding for centering */
    padding-left: 1rem !important;
    width: 80px !important;
}


.premium-table thead th:first-child {
    border-radius: 6px 0 0 8px !important;
}

.premium-table thead th:last-child {
    border-radius: 0 8px 8px 0 !important;
}

/* Premium Radio Centering & Alignment */
.owner-row td .btn-premium-action {
    height: 42px !important;
    width: 42px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: translateY(-5px) !important;
    /* Raised more to match inputs */
}

.custom-radio-premium {
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 !important;
    padding-inline-start: 0 !important;
    width: 28px !important;
    height: 42px !important;
    transform: translateY(-5px) !important;
    /* Raised more to match inputs */
}




.custom-radio-premium .custom-control-label::before,
.custom-radio-premium .custom-control-label::after {
    width: 28px !important;
    height: 28px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    left: 0 !important;
    margin: 0 !important;
}


[dir="rtl"] .custom-radio-premium .custom-control-label::before,
[dir="rtl"] .custom-radio-premium .custom-control-label::after {
    left: auto !important;
    right: 0 !important;
}


/* Basic Responsive Table Styles (For Owners Repeater) */
.basic-responsive-table {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    width: 100% !important;
    margin-bottom: 0 !important;
    background-color: #fff !important;
}

.basic-responsive-table thead th {
    background-color: #f8f9fa !important;
    background-image: none !important;
    color: #495057 !important;
    border: 1px solid #dee2e6 !important;
    padding: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    border-radius: 0 !important;
    text-align: center !important;
    vertical-align: middle !important;
}

.basic-responsive-table tbody td {
    border: 1px solid #dee2e6 !important;
    padding: 0.5rem !important;
    vertical-align: middle !important;
    text-align: center !important;
    background-color: #fff !important;
}

.basic-responsive-table .premium-form-group {
    margin-bottom: 0 !important;
}

/* Breadcrumb Modernization */
.premium-breadcrumb {
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 2px !important;
    padding: 0.5rem 1.25rem !important;
}

.premium-breadcrumb .breadcrumb-item+.breadcrumb-item::before {
    content: "" !important;
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%236366f1' viewBox='0 0 16 16'%3E%3Cpath d='M1 8a.5.5 0 0 1 .5-.5h11.793l-3.147-3.146a.5.5 0 0 1 .708-.708l4 4a.5.5 0 0 1 0 .708l-4 4a.5.5 0 0 1-.708-.708L13.293 8.5H1.5A.5.5 0 0 1 1 8z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    vertical-align: middle !important;
    margin: 0 8px !important;
}

/* Premium Switch with Embedded SVG Icon - Scaled up +5px */
.premium-switch {
    padding-left: 3.25rem !important;
    min-height: 1.75rem !important;
    display: inline-flex !important;
    align-items: center;
}

.premium-switch .custom-control-label::before {
    height: 1.65rem !important;
    /* +5px approx */
    width: 3rem !important;
    /* Proportional width increase */
    border-radius: 2rem !important;
    background-color: #e2e8f0 !important;
    border: none !important;
    top: 0 !important;
    left: -3.25rem !important;
    transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.premium-switch .custom-control-input:checked~.custom-control-label::before {
    background-color: #6366f1 !important;
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.2) !important;
}

.premium-switch .custom-control-label::after {
    width: calc(1.65rem - 4px) !important;
    height: calc(1.65rem - 4px) !important;
    background-color: #ffffff !important;
    border-radius: 50% !important;
    top: 2px !important;
    left: calc(-3.25rem + 2px) !important;
    transition: background-color 0.15s cubic-bezier(0.68, -0.55, 0.265, 1.55), color 0.15s cubic-bezier(0.68, -0.55, 0.265,
            1.55), border-color 0.15s cubic-bezier(0.68, -0.55, 0.265, 1.55), box-shadow 0.15s cubic-bezier(0.68, -0.55, 0.265,
            1.55), transform 0.15s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.15s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
    content: "" !important;
}

.premium-switch .custom-control-input:checked~.custom-control-label::after {
    transform: translateX(1.35rem) !important;
    background-image: var(--icon-tick-indigo) !important;
    background-size: 11px !important;
    /* Increased for clarity */
    background-position: center !important;
    background-repeat: no-repeat !important;
}

[dir="rtl"] .premium-switch,
[data-textdirection='rtl'] .premium-switch {
    padding-left: 0 !important;
    padding-right: 1.25rem !important;
}

[dir="rtl"] .premium-switch .custom-control-label::before,
[data-textdirection='rtl'] .premium-switch .custom-control-label::before {
    right: -3.25rem !important;
    left: auto !important;
}

[dir="rtl"] .premium-switch .custom-control-label::after,
[data-textdirection='rtl'] .premium-switch .custom-control-label::after {
    right: calc(-3.25rem + 2px) !important;
    left: auto !important;
}

[dir="rtl"] .premium-switch .custom-control-input:checked~.custom-control-label::after,
[data-textdirection='rtl'] .premium-switch .custom-control-input:checked~.custom-control-label::after {
    transform: translateX(-1.35rem) !important;
    background-size: 15px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* ==========================================================================
   PREMIUM SWITCH CARD SYSTEM (RTL/LTR COMPATIBLE)
   ========================================================================== */
.premium-switch-container {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    grid-template-areas: "content toggle" !important;
    align-items: center !important;
    gap: 1rem !important;
    background: #f8fafc !important;
    padding: 0.85rem 1.25rem !important;
    border-radius: 2px !important;
    border: 1px solid #e2e8f0 !important;
    cursor: pointer !important;
    width: 100% !important;
    overflow: hidden !important;
}

[data-textdirection='rtl'] .premium-switch-container {
    grid-template-columns: auto 1fr !important;
    grid-template-areas: "toggle content" !important;
}

.premium-switch-container:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}

.premium-switch-content {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
}

.premium-switch-icon-circle {
    width: 38px !important;
    height: 38px !important;
    background: #ffffff !important;
    border-radius: 2px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.1rem !important;
    flex-shrink: 0 !important;
}

.premium-switch-title {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
}

.premium-switch-subtitle {
    font-size: 0.8rem !important;
    color: #64748b !important;
    display: block !important;
}

.premium-switch-content {
    grid-area: content !important;
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    min-width: 0 !important;
}

.modern-switch {
    grid-area: toggle !important;
    flex-shrink: 0 !important;
}

[data-textdirection='rtl'] .premium-switch-content {
    flex-direction: row !important;
    /* Standard row in RTL is Right to Left */
}

[data-textdirection='rtl'] .premium-switch-container {
    padding-right: 0.65rem !important;
}

[data-textdirection='rtl'] .premium-switch-title,
[data-textdirection='rtl'] .premium-switch-subtitle,
[data-textdirection='rtl'] .premium-switch-texts {
    text-align: right !important;
}

/* ==========================================================================
Monthly Reports & Premium UI Modernization Classes
========================================================================== */

/* Premium Modal Enhancements */
.premium-modal-content-styled {
    border-radius: 2px !important;
    overflow: hidden !important;
    border: none !important;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15) !important;
}

.premium-close-button {
    background: #f3f6f9 !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    line-height: 32px !important;
    margin: 0 !important;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

}

.premium-close-button:hover {
    background: #e2e8f0 !important;
    transform: rotate(90deg);
}

/* Clearer Readonly Info Wrappers */
.premium-readonly-wrapper {
    background-color: #f8f9fa !important;
    border: 1px solid #e4e6ef !important;
    border-radius: 2px !important;
    box-shadow: none !important;
}

.premium-readonly-text {
    height: 42px !important;
    line-height: 34px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #1a1f26 !important;
}

/* Premium Popover Panels */
.premium-popover-panel {
    border-radius: 2px !important;
    border: none !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden !important;
    background: #ffffff !important;
}

/* Premium Loop Iteration Badges */
.premium-badge-circle {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

}

.premium-badge-total {
    font-size: 1.1rem !important;
    width: 35px !important;
    height: 18px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

}

/* Multi-use Standard Premium Button */
.btn-premium-standard {
    height: 42px !important;
    border-radius: 2px !important;
    padding: 0 8px !important;
    line-height: 42px !important;
    display: inline-flex !important;
    align-items: center !important;
    font-weight: 600 !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease !important;
}

/* Premium Buttons Moved to the End for Precedence */

.btn-premium-white i,
.btn-premium-back i {
    margin-right: 8px;
    font-size: 1.1rem;
}

[dir="rtl"] .btn-premium-white i,
[dir="rtl"] .btn-premium-back i {
    margin-right: 0;
    margin-left: 8px;
}

.premium-textarea-md {
    border-radius: 2px !important;
}

.premium-status-badge {
    padding: 0.5rem 0.8rem !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    letter-spacing: 0.2px !important;
}

.premium-status-icon {
    font-size: 0.95rem !important;
    font-weight: 800 !important;
}

/* Select2 Modernization inside Premium Wrappers */
.premium-input-wrapper .select2-container--default .select2-selection--single {
    padding-left: 0.8rem !important;
    height: 42px !important;
    border-radius: 2px !important;
    display: flex !important;
    align-items: center !important;
    border: 1px solid #d1d5db !important;
}


/* Textarea Placeholder alignment fix */
.premium-textarea-md {
    padding-top: 15px !important;
}

.premium-textarea-md::placeholder {
    padding-top: 2px !important;
}

/* Premium Centered Switch Layouts - Global Standard */
.premium-switch-centered-wrapper {
    display: flex !important;

    align-items: center !important;
    min-height: 38px !important;
    width: 100% !important;
}

.premium-switch-centered {
    width: 3rem !important;
    height: 1.65rem !important;
    position: relative !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;

}

.premium-switch-centered .custom-control-input {
    position: absolute !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    z-index: 5 !important;
    margin: 0 !important;
    cursor: pointer !important;
    left: 0 !important;
    top: 0 !important;
}

.premium-switch-centered .custom-control-label {
    padding: 0 !important;
    margin: 0 !important;
    width: 3rem !important;
    height: 1.65rem !important;
    cursor: pointer !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    transform: none !important;
}

.premium-switch-centered .custom-control-label::before,
.premium-switch-centered .custom-control-label::after {
    content: "" !important;
    left: 0 !important;
    right: auto !important;
    top: 50% !important;
    margin: 0 !important;
    transform: translateY(-50%) !important;
    position: absolute !important;
    display: block !important;
}

.premium-switch-centered .custom-control-label::before {
    height: 1.65rem !important;
    width: 3rem !important;
    border-radius: 2rem !important;
    background-color: #e2e8f0 !important;
    border: none !important;
    transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.premium-switch-centered .custom-control-label::after {
    width: calc(1.65rem - 4px) !important;
    height: calc(1.65rem - 4px) !important;
    background-color: #ffffff !important;
    border-radius: 50% !important;
    left: 0.125rem !important;
    transition: background-color 0.15s cubic-bezier(0.68, -0.55, 0.265, 1.55), color 0.15s cubic-bezier(0.68, -0.55, 0.265,
            1.55), border-color 0.15s cubic-bezier(0.68, -0.55, 0.265, 1.55), box-shadow 0.15s cubic-bezier(0.68, -0.55, 0.265,
            1.55), transform 0.15s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.15s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
}

.premium-switch-centered .custom-control-input:checked~.custom-control-label::before {
    background-color: #6366f1 !important;
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.2) !important;
}

.premium-switch-centered .custom-control-input:checked~.custom-control-label::after {
    transform: translateY(-50%) translateX(1.35rem) !important;
    background-image: var(--icon-tick-indigo) !important;
    background-size: 8px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}


/* ==========================================================================
Modern Select2 & Multi-select Enhancements (Bidirectional Support)
========================================================================== */
.select2-container--default .select2-selection--multiple {
    border: 1.5px solid #e9ecef !important;
    border-radius: 2px !important;
    padding: 5px 8px !important;
    min-height: 50px !important;
    height: auto !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
    background-color: #fbfbfb !important;
    display: flex !important;
    flex-wrap: wrap !important;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #666ee8 !important;
    background-color: #fff !important;
    box-shadow: 0 4px 8px rgba(102, 110, 232, 0.08) !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #666ee8 !important;
    border: none !important;
    color: #fff !important;
    border-radius: 2px !important;
    padding: 3px 8px !important;
    margin-top: 6px !important;
    margin-inline-end: 8px !important;
    /* Bidirectional Support */
    font-weight: 500 !important;
    font-size: 13px !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    max-width: calc(100% - 8px) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #fff !important;
    margin-inline-start: 5px !important;
    margin-inline-end: 0 !important;
    float: none !important;
    font-weight: bold !important;
    opacity: 0.8;
    transition: opacity 0.2s;
    order: 2 !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    opacity: 1;
    background: transparent !important;
}

.premium-label {
    font-weight: 700 !important;
    color: #1e293b !important;
    margin-bottom: 10px !important;
    display: block !important;
    width: 100% !important;
    font-size: 0.95rem !important;
    /* Standardized size */
    letter-spacing: 0.3px;
    line-height: 1.5 !important;
    min-height: 1.5rem;
}

.premium-label i {
    font-size: 1.4rem;
}

.select2-results__option[aria-selected=true] {
    background-color: #f1f4ff !important;
    color: #666ee8 !important;
    font-weight: 600 !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #666ee8 !important;
    color: #fff !important;
}

.bulk-select-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.btn-bulk-select {
    font-size: 1.1rem !important;
    padding: 4px 10px !important;
    border-radius: 2px !important;
    font-weight: 600 !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}


/* Final Big & Respected Polishing */
.badge-light-primary.badge-pill {
    padding: 6px 8px !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.custom-control-label {
    font-size: 1.15rem !important;
    font-weight: 510 !important;
    color: #404e67 !important;
    padding-top: 2px !important;
}

#exportEmployeesForm small.text-muted {
    font-size: 1.1rem !important;
    color: #828690 !important;
    font-weight: 500 !important;
    margin-top: 10px !important;
}


/* Admin Message Center Premium Styles */
#admin-messages-module {
    --msg-indigo: #6366f1;
    --msg-blue: #3b82f6;
    --msg-bg-light: #f8fafc;
    --msg-border: rgba(99, 102, 241, 0.1);
    --msg-glass: rgba(255, 255, 255, 0.8);
}

#admin-messages-module .content-wrapper {
    font-size: 1.15rem !important;
    background-color: transparent !important;
}

#admin-messages-module .msg-main-card {
    background: var(--msg-glass);
    backdrop-filter: blur(10px);
    border-radius: 2px !important;
    border: 1px solid var(--msg-border) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05) !important;
    overflow: hidden;
    margin-top: 15px;
}

#admin-messages-module .msg-card-header-premium {
    padding: 1.5rem;
    border-bottom: 1px solid var(--msg-border);
    background: rgba(255, 255, 255, 0.4);
}

#admin-messages-module .msg-sidebar-card {
    background: var(--msg-glass);
    backdrop-filter: blur(10px);
    border-radius: 2px !important;
    border: 1px solid var(--msg-border) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05) !important;
    overflow: hidden;
}

#admin-messages-module .msg-sidebar-btn-container {
    padding: 0.75rem 13px !important;
}

#admin-messages-module .msg-sidebar-btn {
    background: linear-gradient(135deg, #1e9ff2, #111d5e) !important;
    color: #fff !important;
    font-weight: 700 !important;
    border-radius: 2px !important;
    padding: 8px !important;
    box-shadow: 0 4px 15px rgba(30, 159, 242, 0.3) !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

#admin-messages-module .msg-sidebar-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(30, 159, 242, 0.4) !important;
}

/* Modal Header Alignment */
#admin-messages-module .modal-header {
    display: flex !important;
    align-items: center !important;

}

#admin-messages-module .msg-nav-link {
    padding: 8px 8px !important;
    color: #64748b !important;
    font-weight: 600 !important;
    border-radius: 2px !important;
    margin: 4px 8px;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

#admin-messages-module .msg-nav-link:hover {
    background: rgba(99, 102, 241, 0.05) !important;
    color: var(--msg-indigo) !important;
    transform: translateX(5px);
}

#admin-messages-module [data-textdirection="rtl"] .msg-nav-link:hover {
    transform: translateX(-5px);
}

#admin-messages-module .msg-nav-link.active {
    background: linear-gradient(to right, rgba(99, 102, 241, 0.1), transparent) !important;
    color: var(--msg-indigo) !important;
    border-left: 4px solid var(--msg-indigo);
}

#admin-messages-module [data-textdirection="rtl"] .msg-nav-link.active {
    background: linear-gradient(to left, rgba(99, 102, 241, 0.1), transparent) !important;
    border-left: none;
    border-right: 4px solid var(--msg-indigo);
}

#admin-messages-module .msg-count-badge {
    background: #f1f5f9;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
}

#admin-messages-module .msg-nav-link.active .msg-count-badge {
    background: var(--msg-indigo);
    color: #fff;
}

/* Message List & Table Styles */
#admin-messages-module .table thead th {
    background: #f8fafc !important;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    font-weight: 700;
    color: #64748b;
    border: none !important;
    padding: 15px 8px;
}

#admin-messages-module .table tbody tr {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.02) !important;
}

#admin-messages-module .table tbody tr:hover {
    background-color: rgba(99, 102, 241, 0.02) !important;
    transform: scale(0.998);
}

#admin-messages-module .msg-star {
    cursor: pointer;
    color: #cbd5e1;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    font-size: 1.1rem;
}

#admin-messages-module .msg-star.starred {
    color: #f59e0b;
}

#admin-messages-module .msg-star:hover {
    transform: scale(1.2);
}

#admin-messages-module .msg-badge-new {
    background: var(--msg-indigo);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

#admin-messages-module .bg-primary-subtle {
    background-color: rgba(99, 102, 241, 0.05) !important;
}

/* Compose Form Premium Styles */
#admin-messages-module .compose-modern-form {
    height: 700px;
}

#admin-messages-module .bg-premium-sidebar {
    background: #fcfdfe !important;
}

#admin-messages-module .glass-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10;
}

#admin-messages-module .premium-search-bar {
    border-radius: 6px;
    background: #fff;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

#admin-messages-module .recipient-card {
    border: 1px solid transparent !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
    margin-bottom: 4px;
}

#admin-messages-module .recipient-card:hover {
    background: rgba(99, 102, 241, 0.02) !important;
    border-color: rgba(99, 102, 241, 0.1) !important;
}

#admin-messages-module .recipient-card.card-selected {
    background: rgba(99, 102, 241, 0.05) !important;
    border-color: var(--msg-indigo) !important;
}

#admin-messages-module .avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--avatar-bg);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

#admin-messages-module .premium-broadcast-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(59, 130, 246, 0.05));
    border-radius: 6px;
    padding: 15px !important;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

#admin-messages-module .icon-orb {
    width: 45px;
    height: 45px;
    border-radius: 6px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

#admin-messages-module .premium-input-wrapper,
#admin-messages-module .premium-textarea-wrapper {
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

#admin-messages-module .premium-input-wrapper:focus-within,
#admin-messages-module .premium-textarea-wrapper:focus-within {
    background: #fff;
    border-color: var(--msg-indigo);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

#admin-messages-module .btn-premium-send {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff !important;
    border-radius: 6px;
    padding: 8px 40px;
    font-weight: 700;
    box-shadow: 0 10px 8px rgba(99, 102, 241, 0.2);
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

#admin-messages-module .btn-premium-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.3);
}

#admin-messages-module .text-right-custom {
    text-align: left !important;
}


/* --- Admin Message Center Cleanup & Modernization --- */

#admin-messages-module .compose-modern-form-wrapper {
    border-radius: 2px !important;
}

#admin-messages-module .premium-input-search {
    font-size: 1.1rem !important;
}

#admin-messages-module .broadcast-icon-orb-lg {
    background: linear-gradient(135deg, #6366f1, #3b82f6);
    width: 80px;
    height: 80px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#admin-messages-module .recipient-clickable-row {
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

#admin-messages-module .employee-primary-name {
    font-size: calc(0.95rem + 2px) !important;
    line-height: 1.2;
}

#admin-messages-module .validation-alert-text {
    font-size: 0.8rem !important;
}

#admin-messages-module .selection-count-number {
    font-size: 1.25rem !important;
}

#admin-messages-module .selection-count-label {
    font-size: 0.85rem !important;
}

#admin-messages-module .btn-clear-selection {
    font-size: 0.85rem !important;
}

#admin-messages-module .broadcast-title-premium {
    font-size: calc(1rem + 3px) !important;
}

#admin-messages-module .broadcast-desc-premium {
    font-size: calc(0.85rem + 3px) !important;
}

#admin-messages-module .premium-label-header {
    font-size: calc(0.75rem + 7px) !important;
}

#admin-messages-module .premium-form-input-lg {
    font-size: calc(1rem + 3px) !important;
}

#admin-messages-module .premium-textarea-input-lg {
    min-height: 180px !important;
    font-size: calc(1rem + 3px) !important;
}

/* Premium Validation Styles */
#admin-messages-module .premium-input-wrapper.border-danger,
#admin-messages-module .premium-textarea-wrapper.border-danger {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1) !important;
    background-color: rgba(220, 53, 69, 0.02) !important;
}

/* Lightened Premium Save Button */
#admin-messages-module .btn-premium-save {
    background: linear-gradient(135deg, #7c83fd, #6366f1) !important;
    opacity: 0.95;
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.15) !important;
}

#admin-messages-module .btn-premium-save:hover {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    opacity: 1;
    box-shadow: 0 8px 8px rgba(99, 102, 241, 0.25) !important;
}

.mt-minus-5 {
    margin-top: -5px !important;
}

#admin-messages-module .border-top {
    border-top-color: #f1f3f5 !important;
}

#admin-messages-module .border-bottom {
    border-bottom-color: #f1f3f5 !important;
}

/* Sidebar Typography Enhancements (+3px) */
#admin-messages-module .msg-sidebar-btn {
    font-size: calc(1rem + 3px) !important;
}

#admin-messages-module .msg-nav-link {
    font-size: calc(1rem + 3px) !important;
}

#admin-messages-module .msg-count-badge {
    font-size: calc(0.75rem + 3px) !important;
}

/* Main Content Typography Enhancements (+2px) */
#admin-messages-module .table thead th {
    font-size: calc(0.75rem + 2px) !important;
}

#admin-messages-module .table tbody td {
    font-size: calc(1rem + 2px) !important;
}

#admin-messages-module .msg-badge-new {
    font-size: calc(0.65rem + 2px) !important;
}

/* Employee Message Center - Modal Scaling */
#employee-messages-module .modal-xl-custom {
    max-width: 95% !important;
}

#employee-messages-module .modal-md-custom {
    max-width: 600px !important;
}

/* ==========================================================================
PREMIUM DATEPICKER SKIN: Indigo Theme (Global)
========================================================================== */
.datepicker {
    border-radius: 2px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    border: none !important;
    padding: 15px !important;
    z-index: 999999 !important;
    width: 270px !important;
    min-width: 270px !important;
    max-width: 270px !important;
    background: #fff !important;
    display: none;
}

.datepicker.datepicker-inline {
    display: block;
}

.datepicker-dropdown:after,
.datepicker-dropdown:before {
    display: none !important;
}

.datepicker-dropdown {
    margin-top: 5px !important;
}

.datepicker table {
    width: 100% !important;
    margin: 0 !important;
}

.datepicker table tr td,
.datepicker table tr th {
    border-radius: 2px !important;
    width: 35px !important;
    height: 35px !important;
    text-align: center !important;
    border: none !important;
    font-family: 'Tajawal', sans-serif !important;
}

.datepicker table tr td.active,
.datepicker table tr td.active:hover,
.datepicker table tr td.active.active,
.datepicker table tr td.active.disabled,
.datepicker table tr td.active.disabled:hover {
    background-color: #666ee8 !important;
    color: #fff !important;
    background-image: none !important;
    text-shadow: none !important;
}

.datepicker table tr td.day:hover,
.datepicker table tr td.month:hover,
.datepicker table tr td.year:hover {
    background: #f0f1ff !important;
    color: #666ee8 !important;
}

.datepicker .datepicker-switch:hover,
.datepicker .next:hover,
.datepicker .prev:hover,
.datepicker tfoot tr th:hover {
    background: #f0f1ff !important;
    color: #666ee8 !important;
}

.datepicker .date.premium-readonly-text {
    font-weight: 700 !important;
    color: #1e293b !important;
    font-size: 1rem !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
}

.datepicker .datepicker-switch {
    font-weight: 700 !important;
    color: #1e1e2d !important;
    font-size: 1rem !important;
}

.datepicker th.next,
.datepicker th.prev,
.datepicker th.datepicker-switch {
    height: 40px !important;
}

.datepicker .dow {
    font-weight: 600 !important;
    color: #6c757d !important;
    font-size: 0.85rem !important;
}

.datepicker .prev,
.datepicker .next {
    font-family: 'LineAwesome' !important;
    font-size: 1.2rem !important;
}

/* ==========================================================================
PREMIUM SELECT2 INDIGO SKIN (LTR)
========================================================================== */
.select2-container--default .select2-selection--single {
    background-color: #fff !important;
    border: 1.5px solid #e2e8f0 !important;
    /* Unified border */
    border-radius: 2px !important;
    height: 3rem !important;
    /* Unified Premium Height */
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease !important;
    display: flex !important;
    align-items: center !important;
    box-shadow: none !important;
    /* Removed shadow as requested */
}

.premium-input-wrapper {
    display: block !important;
    width: 100% !important;
    position: relative !important;
}


.premium-input-wrapper .select2-container,
.premium-input-wrapper .select2-container--default,
.premium-input-wrapper .select2-container--default .select2-selection--single {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    position: relative !important;
    background-image: none !important;
}



/* Premium Secondary Button - Matched to Save Button */
.btn-premium-secondary {
    background-color: #f8f9fa !important;
    color: #4b5563 !important;
    border: 1px solid #e5e7eb !important;
    padding: 0 24px !important;
    border-radius: 2px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 42px !important;
    min-width: 120px !important;
    vertical-align: middle !important;
    /* Force baseline alignment */
    line-height: 1 !important;
    margin: 0 !important;
    /* Eliminate any shifting margins */
    box-sizing: border-box !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    /* Same as Save */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

.btn-premium-secondary:hover {
    background-color: #ffffff !important;
    color: #1e293b !important;
    border-color: #cbd5e1 !important;
    transform: translateY(-3px) !important;
    /* Same as Save */
    box-shadow: 0 10px 8px rgba(0, 0, 0, 0.08) !important;
}

.btn-premium-secondary i {
    font-size: 1.2rem !important;
    margin-right: 6px !important;
}

/* Premium Modal Footer - Standardized Spacing */
.premium-modal-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 4px !important;
    /* Precision 4px horizontal distance */
    padding: 10px 1.25rem !important;
    /* Reduced vertical padding */
    border-top: none !important;
}

/* Premium Modal Close Button */
.premium-modal-close {
    background: #f1f5f9 !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;

    opacity: 0.8 !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease !important;
    outline: none !important;
    margin: 10px !important;
    position: absolute !important;
    top: 10px !important;
    /* Standardized height */
    right: 15px !important;
}

.premium-modal-close:hover {
    background: #e2e8f0 !important;
    opacity: 1 !important;
    transform: rotate(90deg) !important;
    color: #ff7588 !important;
}

.premium-modal-close i {
    font-size: 1.1rem !important;
    margin: 0 !important;
}

/* Premium Utility Classes */
.bg-premium-gradient {
    background: linear-gradient(135deg, #1F3BB3 0%, #4B63D4 100%) !important;
}

.bg-indigo-alt {
    background-color: #6610f2 !important;
}

.avatar-circle {
    border-radius: 50%;
}

.avatar-size-100 {
    width: 100px;
    height: 100px;
}

/* Modal Details Card Styling */
.modal-details-card {
    background: #fff;
    border-radius: 6px;
    position: relative;

}

/* Bulletproof Ghost Element Centering */
.modal.modal-pop {
    text-align: center !important;
    padding: 0 !important;
}

.modal.modal-pop:before {
    content: '';
    display: inline-block;
    height: 100%;
    vertical-align: middle;
    margin-right: -4px;
}

.modal.modal-pop .modal-dialog {
    display: inline-block !important;
    text-align: left !important;
    vertical-align: middle !important;
    margin: 10px auto !important;
    max-width: 1000px !important;
    width: 95% !important;
    float: none !important;
    position: relative;
    top: 0 !important;
    transform: none !important;
}

.modal-pop .modal-content {
    border-radius: 2px !important;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2) !important;
    border: none !important;
}



.premium-modal-header {
    height: 100px !important;
    background: #f8fafc !important;
    margin: -1.5rem -1.5rem 0 -1.5rem !important;
    position: relative !important;
    overflow: hidden !important;
    border-radius: 2px 10px 0 0 !important;
    border-top: 6px solid #0a1969 !important;
    /* Rich Ink Navy */
}

/* Abstract Background Elements */
.premium-modal-header::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -20px;
    width: 150px;
    height: 150px;
    background: rgba(10, 25, 105, 0.12);
    /* More visible abstract shape */
    border-radius: 50%;
    z-index: 1;
}

.premium-modal-header::after {
    content: '';
    position: absolute;
    bottom: -30px;
    right: -20px;
    width: 120px;
    height: 120px;
    background: rgba(10, 25, 105, 0.08);
    /* More visible abstract shape */
    border-radius: 2px;
    transform: rotate(45deg);
    z-index: 1;
}

.modal-profile-wrapper {
    margin-top: -50px !important;
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.modal-profile-wrapper::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(31, 59, 179, 0.1) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.modal-profile-wrapper .avatar-circle {
    border: 5px solid #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.modal-name-title {
    color: #1F3BB3;
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
}

.modal-role-badge {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 8px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
}

.modal-info-list {
    padding: 1.5rem 0.5rem;
}

.detail-item-modern {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #f1f5f9;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.detail-item-modern:hover {
    border-color: #e2e8f0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.detail-item-modern .icon-circle {
    width: 45px;
    height: 45px;
    background: #f8fafc;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: #1F3BB3;
}

.detail-item-modern .icon-circle i {
    font-size: 1.25rem;
}

.detail-info-label {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.detail-info-value {
    display: block;
    font-size: 0.95rem;
    color: #334155;
    font-weight: 600;
}

[data-textdirection="rtl"] .detail-item-modern .icon-circle {
    margin-right: 0;
    margin-left: 1rem;
}

[data-textdirection="rtl"] .detail-info-box {
    text-align: right !important;
}



/* ==========================================================================
Premium Permission Cards Design
========================================================================== */
.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    padding: 10px 5px;
}

.permission-card {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.permission-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-5px);
    border-color: #1e9ff2;
}

.permission-card-header {
    padding: 1.25rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.permission-card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    color: #1e293b;
    font-size: 1.05rem;
}

.permission-card-title i {
    font-size: 1.5rem;
    color: #1e9ff2;
    background: rgba(30, 159, 242, 0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
}

.permission-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    flex-grow: 1;
}

.permission-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 2px;
    background: #fcfcfc;
    border: 1px solid #f8fafc;
    transition: all 0.2s ease;
}

.permission-item:hover {
    background: #f8fafc;
    border-color: #eef2f7;
}

.permission-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.permission-label {
    font-size: 0.95rem;
    color: #334155;
    font-weight: 700;
    margin-bottom: 0 !important;
}

.permission-desc {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 0;
    line-height: 1.3;
}


.permission-item:hover {
    background: #f1f5f9;
}

.permission-label {
    font-size: 0.9rem;
    color: #1e293b;
    font-weight: 700;
    margin-bottom: 0 !important;
}

.permission-desc {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 0;
    line-height: 1.2;
}

.permission-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Disabled State for Card */
.permission-card.disabled-card {
    opacity: 0.85;
    background-color: #fafafa;
    border-color: #e2e8f0 !important;
    pointer-events: none;
}

.permission-card.disabled-card .permission-card-header {
    background: #f1f5f9;
}

.permission-card.disabled-card .permission-card-title i {
    color: #94a3b8;
}


/* Premium Color Selection V2 */
.color-options-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.color-chip {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--chip-color);
    cursor: pointer;
    transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0,
            0.2, 1), opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

.color-chip:hover {
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.color-chip.active {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px #6366f1;
}

.color-chip.active::after {
    content: '\f17b';
    /* la-check */
    font-family: 'LineAwesome';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 14px;
    font-weight: 900;
}

.advanced-picker-trigger {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
    color: #64748b;
}

.advanced-picker-trigger:hover {
    background: #e2e8f0;
    color: #6366f1;
    border-color: #6366f1;
}

.color-preview-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #1e9ff2;
    margin-inline-end: 8px;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.premium-hex-display {
    border: none !important;
    background: #f8fafc !important;
    border-radius: 2px !important;
    padding: 4px 8px !important;
    font-family: 'Monaco', 'Consolas', monospace;
    font-weight: 700;
    color: #475569;
    font-size: 0.9rem;
    width: 100px;
}


/* Support for Inputs without Icons */
.premium-input-wrapper.no-icon .premium-input {
    padding-left: 1.25rem !important;
}

[data-textdirection='rtl'] .premium-input-wrapper.no-icon .premium-input {
    padding-right: 1.25rem !important;
}




/* ==========================================================================
Dynamic Company Header Branding
========================================================================== */
.company-header-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 1rem;
}

.brand-pill {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    padding: 5px 12px;
    border-radius: 8px !important;
    border: 1px solid #eef0f2;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.brand-pill:hover {
    background: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    border-color: #5A8DEE;
}

.brand-avatar {
    width: 32px;
    height: 32px;
    border-radius: 2px !important;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.brand-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-avatar .initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
}

.brand-text {
    font-weight: 600;
    color: #475f7b;
    font-size: 0.95rem;
    white-space: nowrap;
}

/* RTL Support for Header Branding */
[data-textdirection='rtl'] .brand-pill {
    padding: 5px 6px 5px 15px;
}

[data-textdirection='rtl'] .brand-avatar {
    margin-right: 0;
    margin-left: 10px;
}

[data-textdirection='rtl'] .company-header-brand {
    padding-left: 0;
    padding-right: 1.5rem;
}

/* ==========================================================================
Role Management & Protected Fields
========================================================================== */
.select2-container--default.select2-container--disabled .select2-selection--single {
    cursor: not-allowed !important;
}

.select2-container--default .select2-selection--single .select2-selection__clear,
.select2-custom-reset {
    display: none !important;
}

/* ==========================================================================
SweetAlert Premium Centering & Styling
========================================================================== */
.swal-modal {
    border-radius: 18px !important;
    padding: 10px !important;
}

.swal-title {
    text-align: center !important;
    font-size: 1.525rem !important;
    /* Increased by 2px */
    color: #1e293b !important;
    font-weight: 700 !important;
    padding: 8px 8px 10px !important;
}

.swal-text {
    text-align: center !important;
    font-size: 1.175rem !important;
    /* Increased by 2px */
    color: #475569 !important;
    line-height: 1.6 !important;
    padding: 0 8px 8px !important;
    display: block !important;
}

.swal-button {
    border: none !important;
    border-radius: 2px !important;
    /* Unified rounded style */
    padding: 10px 30px !important;
    font-weight: 700 !important;
    font-size: 1.05rem !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    outline: none !important;
}

.swal-button:active {
    transform: scale(0.96) !important;
}

.swal-button--confirm {
    background-color: #ffffff !important;
    color: #475569 !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.swal-button--confirm:before {
    content: "\f00c";
    /* fa-check */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 8px;
    font-size: 1.1rem;
    color: #1e9ff2 !important;
    /* Blue Icon */
}

html[dir="rtl"] .swal-button--confirm:before,
[data-textdirection="rtl"] .swal-button--confirm:before {
    margin-right: 0 !important;
    margin-left: 12px !important;
}

.swal-button--confirm:hover {
    background-color: #ffffff !important;
    border-color: #5A8DEE !important;
    color: #1e293b !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-2px) !important;
}

.swal-button--cancel {
    background-color: #ffffff !important;
    color: #475569 !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    border-radius: 2px !important;
    /* Match confirm exactly */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.swal-button--cancel:before {
    content: "\f00d";
    /* fa-times (X) */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 8px;
    font-size: 1.1rem;
    color: #ef4444 !important;
    /* Red Icon */
}

html[dir="rtl"] .swal-button--cancel:before,
[data-textdirection="rtl"] .swal-button--cancel:before {
    margin-right: 0 !important;
    margin-left: 12px !important;
}

.swal-button--cancel:hover {
    background-color: #ffffff !important;
    border-color: #5A8DEE !important;
    color: #1e293b !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-2px) !important;
}

.swal-button:focus {
    box-shadow: none !important;
}

.swal-button-container {
    margin: 0 !important;
    position: relative !important;
    /* Required for absolute loader positioning */
}

/* SweetAlert Single Spinner Fix (Perfectly replaces the icon) */
.swal-button__loader {
    display: none !important;
    /* Hide the external loader div */
}

.swal-button--loading:before {
    content: "" !important;
    /* Clear the FontAwesome icon */
    width: 18px !important;
    height: 18px !important;
    border: 2.5px solid rgba(30, 159, 242, 0.15) !important;
    border-top: 2.5px solid #1e9ff2 !important;
    border-radius: 50% !important;
    animation: swal-loading-rotate 0.6s linear infinite !important;
    display: inline-block !important;
    margin-right: 12px !important;
    margin-left: 0 !important;
}

html[dir="rtl"] .swal-button--loading:before,
[data-textdirection="rtl"] .swal-button--loading:before {
    margin-right: 0 !important;
    margin-left: 12px !important;
}

@keyframes swal-loading-rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.form-control {
    font-size: 1.1rem !important;
    /* Standardized input size */
    font-weight: 500 !important;
    color: #1e293b !important;
    border-radius: 2px !important;
}

/* Title & Text Centering */
.swal-title,
.swal-text {
    text-align: center !important;
    color: #1e293b !important;
}

[data-textdirection='rtl'] .swal-title,
[data-textdirection='rtl'] .swal-text {
    text-align: center !important;
}

/* --- Optimized Snappy Select2 (No Lag) --- */
body .select2-container--default .select2-results__option--highlighted,
body .select2-container--default .select2-results__option--highlighted[aria-selected],
body .select2-container--default .select2-results__option[aria-selected=true],
body .select2-results__option--highlighted {
    background-color: transparent !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

.select2-result-repository {
    padding: 10px 18px !important;
    /* Fixed padding */
    display: flex !important;
    align-items: center !important;
    background: #ffffff !important;
    border-bottom: 1px solid #f1f5f9 !important;
    width: 100% !important;
    position: relative !important;
    box-sizing: border-box !important;
    transition: background-color 0.1s ease !important;
    /* Snappy Background */
}

.select2-result-repository__avatar {
    width: 34px !important;
    height: 34px !important;
    margin-right: 14px !important;
    flex-shrink: 0 !important;
    position: relative !important;
}

[data-textdirection='rtl'] .select2-result-repository__avatar {
    margin-right: 0 !important;
    margin-left: 14px !important;
}

.select2-result-repository__avatar img,
.select2-result-avatar-initials {
    width: 34px !important;
    height: 34px !important;
    border-radius: 2px !important;
    /* Soft Squircle */
    display: flex !important;
    align-items: center !important;

    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06) !important;
    /* Soft elevation */
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Glossy Overlay for Premium Look */
.select2-result-avatar-initials::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0) 60%) !important;
    pointer-events: none;
}

.select2-result-avatar-initials {
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.select2-result-repository__title {
    color: #334155 !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    transition: color 0.1s ease !important;
    /* Snappy Title Color */
}

.select2-result-repository__description {
    font-size: 0.8rem !important;
    color: #94a3b8 !important;
    display: flex !important;
    gap: 8px !important;
}

/* Optimized Hover: No shifts, no lag */
.select2-results__option--highlighted .select2-result-repository {
    background-color: #f8fafc !important;
}

.select2-results__option--highlighted .select2-result-repository__title {
    color: #2563eb !important;
}

.select2-results__option--highlighted .select2-result-repository__description i {
    color: #2563eb !important;
}

/* Stationary Static Indicator (No animation) */
.select2-results__option--highlighted .select2-result-repository::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #2563eb;
}

[data-textdirection='rtl'] .select2-results__option--highlighted .select2-result-repository::before {
    left: auto;
    right: 0;
}

.select2-results__option {
    padding: 0 !important;
}

/* Remove default Select2 styling */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: transparent !important;
}

.select2-results__option {
    background-color: transparent !important;
    padding: 0 !important;
}


/* Premium Mandatory Section Styling */
.premium-mandatory-section {
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(220, 38, 38, 0.2);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.05);
    background: #fff;
    margin-bottom: 2rem;
}

.premium-mandatory-header {
    background: #f8fafc;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
    font-size: 1.58rem;
    font-weight: 800;
    color: #1e293b;
}

.premium-mandatory-header .title-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #1e293b;
    font-weight: 800;
    font-size: 1.27rem;
}

.premium-mandatory-header i {
    font-size: 1.45rem;
    color: #475569;
    margin-right: 0;
}

.premium-mandatory-body {
    padding: 25px 20px;
}

/* Icons in mandatory section (LTR) */
html[data-textdirection="ltr"] .premium-mandatory-body .premium-input-wrapper i {
    color: #b91c1c !important;
    z-index: 100 !important;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    left: 0.9rem !important;
    right: auto !important;
}

html[data-textdirection="ltr"] .premium-mandatory-body .premium-input {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
}

/* Icons in mandatory section (RTL) */
html[data-textdirection="rtl"] .premium-mandatory-body .premium-input-wrapper i {
    color: #b91c1c !important;
    z-index: 100 !important;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    right: 0.9rem !important;
    /* left: auto !important; */
}

html[data-textdirection="rtl"] .premium-mandatory-body .premium-input {
    padding-right: 0.75rem !important;
    padding-left: 0.75rem !important;
}

.premium-mandatory-body .premium-input:focus {
    border-color: #f87171 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
}

/* ====== FORCE SELECT2 DROPDOWN OPTION TEXT BLACK ====== */
.select2-container .select2-results__option,
.select2-container--default .select2-results__option,
.select2-dropdown .select2-results__option,
ul.select2-results__options li.select2-results__option {
    color: #000000 !important;
    background-color: #ffffff !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container .select2-results__option--highlighted[aria-selected] {
    background-color: #666ee8 !important;
    color: #ffffff !important;
}

/* ================================================================
Simple Premium Effect â€” Static Select2 (non-AJAX)
Targets options WITHOUT the company avatar template safely.
Does NOT affect company/property/maintenance AJAX select2.
================================================================ */

/* Base State */
body .select2-dropdown:not(.premium-ajax-dropdown) .select2-results__option {
    padding: 8px 8px !important;
    font-size: 1.05rem !important;
    color: #475569 !important;
    background-color: #ffffff !important;
    border-bottom: 1px solid #f1f5f9 !important;
    margin: 0 !important;
}

/* Remove bottom border from last child */
body .select2-dropdown:not(.premium-ajax-dropdown) .select2-results__option:last-child {
    border-bottom: none !important;
}

/* Hover State (Prevents Jitter and Color Loss) */
body .select2-dropdown:not(.premium-ajax-dropdown) .select2-results__option--highlighted[aria-selected],
body .select2-dropdown:not(.premium-ajax-dropdown) .select2-results__option--highlighted {
    padding: 8px 8px !important;
    margin: 0 !important;
    background-color: #f1f5f9 !important;
    color: #1e9ff2 !important;
}

/* Selected State */
body .select2-dropdown:not(.premium-ajax-dropdown) .select2-results__option[aria-selected="true"] {
    padding: 8px 8px !important;
    margin: 0 !important;
    background-color: #e0f2fe !important;
    color: #0369a1 !important;
    font-weight: 600 !important;
}



/* Textarea Improvements */
textarea.premium-input {
    height: auto !important;
    padding: 8px 15px !important;
    line-height: 1.6 !important;
    resize: vertical !important;
    border: 1px solid #e2e8f0 !important;
    min-height: 80px !important;
    background: #ffffff !important;
    width: 100% !important;
    font-size: 1.1rem !important;
}

/* Fix for Placeholder overlap/alignment in Textarea */
textarea.premium-input::placeholder {
    color: #94a3b8 !important;
    font-size: 1rem !important;
    opacity: 0.7;
}

/* Ultimate Fix for Textarea Height & RTL alignment */
textarea.form-control.premium-input {
    height: auto !important;
    min-height: 80px !important;
    display: block !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
}

/* ===================================================
Standalone Textarea (no icon wrapper)
=================================================== */
textarea.premium-textarea-standalone {
    display: block !important;
    width: 100% !important;
    min-height: 90px !important;
    height: auto !important;
    padding: 8px 8px !important;
    font-size: 1.05rem !important;
    font-weight: 500 !important;
    color: #1e293b !important;
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 2px !important;
    line-height: 1.6 !important;
    resize: vertical !important;
    box-shadow: none !important;
    outline: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

textarea.premium-textarea-standalone::placeholder {
    color: #94a3b8 !important;
    font-size: 0.95rem !important;
    opacity: 1 !important;
    text-align: right;
}

[data-textdirection="ltr"] textarea.premium-textarea-standalone::placeholder {
    text-align: left;
}

textarea.premium-textarea-standalone:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
    outline: none !important;
}

textarea.premium-textarea-standalone:disabled {
    background: #f8fafc !important;
    cursor: not-allowed;
    opacity: 0.7;
}

/* =====================================================
RTL/LTR Dynamic Border End Utility
===================================================== */
html[data-textdirection="ltr"] .premium-border-end {
    border-right: 1px solid #e2e8f0 !important;
    border-left: none !important;
}

html[data-textdirection="rtl"] .premium-border-end {
    border-left: 1px solid #e2e8f0 !important;
    border-right: none !important;
}

/* ================================================================
Premium Balance Card (Payments Module)
================================================================ */
.premium-balance-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 2px !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05) !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.balance-icon-box {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

.bg-premium-gradient {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
}

.balance-name-text {
    font-size: 0.95rem !important;
    color: #1e293b !important;
}

.balance-label-text {
    font-size: 0.75rem !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b !important;
}

.premium-border-end {
    border-right: 1px solid #f1f5f9 !important;
}

/* RTL Support for Balance Card */
html[data-textdirection="rtl"] .balance-icon-box {
    margin-right: 0 !important;
    margin-left: 8px !important;
}

html[data-textdirection="rtl"] .premium-border-end {
    border-right: none !important;
    border-left: 1px solid #f1f5f9 !important;
}

/* Interactive hover effect */
.premium-balance-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
    border-color: #cbd5e1 !important;
}


/* ==========================================================================
ðŸš€ PLATINUM PERFORMANCE ACCELERATORS (AUTO-INJECTED)
========================================================================== */

/* 1. Hardware Acceleration (GPU) for frequently interactive elements */
.btn,
.dropdown-menu,
.modal-dialog,
.select2-selection,
.card {
    will-change: transform, opacity;
}

/* 2. Kill expensive transitions inside complex components (Select2) */
.select2-results__option,
.select2-selection__rendered,
.select2-selection__arrow {
    transition: none !important;
}

/* 3. Extremely snappy table row hover */
table.table-hover tbody tr {
    transition: background-color 0.1s ease !important;
}

/* ==========================================================================
ðŸš€ PLATINUM SUMMERNOTE OVERRIDES
========================================================================== */
.note-editor.note-frame {
    border: 1px solid #e2e8f0 !important;
    border-radius: 2px !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    overflow: hidden;
}

.note-editor .note-toolbar {
    background-color: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 10px 15px !important;
    margin: 0 !important;
}

.note-editor .note-btn {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 4px !important;
    color: #475569 !important;
    box-shadow: none !important;
    transition: all 0.15s ease-in-out !important;
}

.note-editor .note-btn:hover,
.note-editor .note-btn.active {
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #3b82f6 !important;
}

.note-editor .note-editable {
    padding: 8px !important;
    color: #334155 !important;
    background-color: #ffffff !important;
}

.note-editor.note-frame .note-statusbar {
    background-color: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
}

/* 4. Removed global backdrop-filter override to preserve premium glassmorphism designs */

/* Premium Info Card Styles */
.premium-info-card {
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 2px !important;
    transition: all 0.2s ease;
}

.border-left-primary {
    border-left: 4px solid #1e9ff2 !important;
}

html[data-textdirection="rtl"] .border-left-primary {
    border-left: none !important;
    border-right: 4px solid #1e9ff2 !important;
}

.bg-light-primary {
    background-color: rgba(30, 159, 242, 0.03) !important;
}

/* Premium Tips Card Section */
.premium-tips-card {
    background: #f0f7ff !important;
    /* Very light blue background */
    border: 1px solid #bae6fd !important;
    border-radius: 2px !important;
    padding: 1.25rem !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important;
}

.premium-tips-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(186, 230, 253, 0.5);
}

.premium-tips-header i {
    color: #f59e0b !important;
    font-size: 1.35rem !important;
}

.premium-tips-header span {
    font-weight: 700 !important;
    color: #1e3a8a !important;
    font-size: 1.05rem !important;
}

.premium-tips-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 8px;
}

.premium-tips-list li {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: #475569 !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
}

.premium-tips-list li i {
    color: #f59e0b !important;
    font-size: 0.9rem !important;
}

/* RTL Adjustment for Tips List */
html[data-textdirection="rtl"] .premium-tips-list li i {
    margin-left: 0 !important;
}


.js-card-due-date {
    font-size: 1.1rem;
}

/* Professional Shift for Guarantors Menu (RTL Only) */
html[data-textdirection="rtl"] .shift-guarantors-rtl {
    display: inline-block !important;
    transform: translateX(-10px) !important;
    transition: transform 0.3s ease !important;
}

/* Premium Stat Icon Floating Shift - Centered Fix */
.stat-icon-wrapper {
    transform: translateY(0) !important;
    transition: transform 0.3s ease !important;
    display: flex !important;
    align-items: center !important;

}

/* Premium Textarea Height Standardization */
textarea.premium-input {
    height: auto !important;
    min-height: 45px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

/* Global Fully Paid Message Styled (Matching System Image) */
.fully-paid-card {
    background: #ffffff !important;
    border-radius: 2px !important;
    border: 1px solid #f1f5f9 !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04) !important;
    padding: 40px 8px !important;
    text-align: center !important;
    margin-bottom: 2rem !important;
}

.fully-paid-icon-wrapper {
    width: 80px;
    height: 80px;
    background-color: #28d094;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 35px;
    box-shadow: 0 10px 8px rgba(40, 208, 148, 0.2);
}

.fully-paid-title {
    color: #28d094 !important;
    font-weight: 800 !important;
    font-size: 1.6rem !important;
    margin-bottom: 10px !important;
}

.fully-paid-subtitle {
    color: #b0b0b0 !important;
    font-size: 1.1rem !important;
    margin-bottom: 0 !important;
}

/* ========================================================================
GLOBAL PREMIUM BUTTONS (PILL DESIGN) - FINAL OVERRIDE
======================================================================== */
.btn-premium-white,
.btn-premium-back,
.btn-premium-add,
.btn-premium-save,
.btn.btn-premium-add,
.btn.btn-premium-save,
button.btn-premium-add,
button.btn-premium-save,
a.btn-premium-back {
    background: #ffffff !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
    padding: 0 24px !important;
    border-radius: 2px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 42px !important;
    min-width: 120px !important;
    vertical-align: middle !important;
    /* Force baseline alignment */
    line-height: 1 !important;
    margin: 0 4px !important;
    /* Spacing between buttons */
    box-sizing: border-box !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03) !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

.btn-premium-white:hover,
.btn-premium-back:hover,
.btn-premium-add:hover,
.btn-premium-save:hover,
.btn.btn-premium-add:hover,
.btn.btn-premium-save:hover,
button.btn-premium-add:hover,
button.btn-premium-save:hover,
a.btn-premium-back:hover {
    background: #f0f9ff !important;
    color: #3b82f6 !important;
    border-color: #3b82f6 !important;
    transform: translateY(-3px) !important;
    /* Slightly reduced lift */
    box-shadow: 0 10px 8px rgba(59, 130, 246, 0.15) !important;
}

.btn-premium-add i,
.btn-premium-save i,
.btn-premium-back i {
    margin-right: 8px !important;
    margin-left: 8px !important;
}


/* RTL PREFIXED STYLES */
html[dir='rtl'] body,
html[dir='rtl'] {
    font-family: "Poppins", "Tajawal", sans-serif;
    font-weight: normal;
    font-style: normal;
}

/* Modern Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
    border: 2px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

html[dir='rtl'] select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: var(--icon-chevron-blue) !important;
    background-repeat: no-repeat !important;
    background-position: left 0.85rem center !important;
    background-size: 1.1rem !important;
    padding-left: 2.8rem !important;
    padding-right: 1.25rem !important;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease !important;
}

html[dir='rtl'] select:focus {
    border-color: #1e9ff2 !important;
    box-shadow: 0 0 0 4px rgba(30, 159, 242, 0.1) !important;
}

html[dir='rtl'] table.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control:before,
html[dir='rtl'] table.dataTable.dtr-inline.collapsed>tbody>tr>th.dtr-control:before {
    display: inline-flex !important;
    align-items: center !important;

    content: "" !important;
    width: 14px !important;
    height: 14px !important;
    border: none !important;
    background: transparent !important;
    margin-left: 8px !important;
    margin-right: 0 !important;
    /* Drawing a cleaner triangle with clip-path or simple borders */
    border-top: 5px solid transparent !important;
    border-bottom: 5px solid transparent !important;
    border-right: 8px solid rgba(0, 0, 0, 0.4) !important;
    /* Pointing LEFT for RTL */
    border-left: 0 !important;
    transition: transform 0.2s ease !important;
}

html[dir='rtl'] table.dataTable.dtr-inline.collapsed>tbody>tr.parent>td.dtr-control:before,
html[dir='rtl'] table.dataTable.dtr-inline.collapsed>tbody>tr.parent>th.dtr-control:before {
    transform: rotate(-90deg) !important;
    /* Rotate when expanded */
}

input[type="checkbox"] {
    width: 1.0em;
    height: 1.0em;
}

#myTable td,
#myTable th {
    vertical-align: middle
}

#statusLabel {
    margin-top: 35px;
    font-size: 13px
}

#statusLabel span {
    padding: 0 10px;
}


table.dataTable td,
th {
    font-size: 0.92em;
}

.page-item.disabled .page-link {
    background-color: #fff !important;
    color: #ced4da !important;
    border-color: #f0f2f5 !important;
    pointer-events: none !important;
    font-size: 0.85rem !important;
}

/* Premium Global Pagination Style - RTL */
.pagination {
    margin-top: 1.5rem !important;
}

.page-item .page-link {
    border: 1px solid #f0f2f5 !important;
    margin: 0 4px !important;
    padding: 10px 18px !important;
    border-radius: 2px !important;
    color: #495057 !important;
    font-weight: 500 !important;
    background-color: #fff !important;
    transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-size: 0.9rem !important;
}

.page-item.active .page-link {
    background-color: #1e9ff2 !important;
    /* Primary project color */
    border-color: #1e9ff2 !important;
    color: #fff !important;
    box-shadow: 0 5px 15px rgba(30, 159, 242, 0.35) !important;
}

.page-item .page-link:hover {
    background-color: #f8f9fa !important;
    border-color: #1e9ff2 !important;
    transform: translateY(-2px) !important;
}


.note-editor.is-invalid-summernote-editor {
    border: 1px solid #dc3545 !important;
}

.table-image {
    width: 70px;
    height: 60px;
    border-radius: 2px;
}



/* Style the entire scrollbar */
::-webkit-scrollbar {
    width: 5px;
    /* Set width for vertical scrollbar */
    height: 8px;
    /* Set height for horizontal scrollbar */
}

/* Style the scrollbar track */
::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 1px;
}

/* Style the scrollbar thumb */
::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 1px;
}

/* Style the scrollbar thumb on hover */
::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* btn Style */
.btn {
    padding: 0.60rem 0.6rem;
    font-size: 0.95rem;
    line-height: 1.1;
}

.badge-sm {
    font-size: 0.6rem;
}

/* form controller Style */

.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.975rem;
    font-weight: 400;
    line-height: 1.4rem;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #e2e8f0;
    appearance: none;
    border-radius: 6px;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}


.text-danger {
    font-size: 11px;
}

.form-control {
    font-size: 0.9rem;
}

html body a {
    color: #59597e;
    font-weight: bolder
}

label {
    display: inline-block;
    margin-bottom: .5rem;
    font-size: 0.95rem;
}

.main-menu.menu-dark .navigation li a {
    color: #dcdcdc;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    font-size: 0.94rem;
    font-weight: 300;
}

html body .la {
    font-size: 1.0rem;
}


.nav.nav-tabs.nav-underline {
    background: transparent;
    position: relative;
    border-bottom: 1px solid #1E9FF2;
}


.strong-weight {
    font-size: 8px;
    font-weight: bolder;
}

.table-container {
    position: relative;
}

#loading-indicator {
    font-size: 15px;
    font-weight: bolder;
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    background-color: rgba(117, 112, 112, 0.8);
    padding: 8px;
    border-radius: 5px;
    color: white
}

#spinner {
    font-size: 8px;
}

/* Removed broken max-height constraints */

.note-editable,
.note-code {
    height: 400px;
    min-height: 400px;
}

.font-boder {
    font-weight: 700;
    font-size: 1rem;
}

/* Select2 RTL Clear Button Fix */
html[dir='rtl'] [data-textdirection="rtl"] .select2-container--default .select2-selection--single .select2-selection__clear {
    position: absolute !important;
    left: 8px !important;
    /* Move it next to the arrow */
    right: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    margin-top: -1px !important;
    /* Move up by 2px as requested */
    cursor: pointer;
    font-weight: bold;
    color: #999;
}

html[data-textdirection='rtl'] .select2-container--default .select2-selection--single .select2-selection__arrow,
.select2-container--rtl .select2-selection--single .select2-selection__arrow {
    left: 1px !important;
    right: auto !important;
    position: absolute !important;
}

/* Select2 RTL selection padding fix */
html[data-textdirection='rtl'] .select2-container--default .select2-selection--single,
html[data-textdirection='rtl'] .select2-selection--single,
html[data-textdirection='rtl'] .select2-selection__rendered,
html[data-textdirection='rtl'] .select2-selection__placeholder {
    padding-right: 8px !important;
    margin-right: 0px !important;
    text-align: right !important;
    direction: rtl !important;
}

html[data-textdirection='rtl'] .select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-container--rtl .select2-selection--single .select2-selection__rendered,
.select2-container--rtl .select2-selection--single .select2-selection__placeholder {
    padding-right: 8px !important;
    padding-left: 25px !important;
    text-align: right !important;
    direction: rtl !important;
}

/* Native Date & Month Input RTL Styling */
html[data-textdirection="rtl"] input[type="date"],
html[data-textdirection="rtl"] input[type="month"] {
    text-align: right !important;
    direction: rtl !important;
    position: relative;
    padding-left: 35px !important;
}

html[data-textdirection="rtl"] input[type="date"]::-webkit-calendar-picker-indicator,
html[data-textdirection="rtl"] input[type="month"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 !important;
}

/* Premium Global Table Style - RTL */
html[dir='rtl'] .table {
    border-collapse: separate !important;
    border-spacing: 0 2px !important;
    margin-bottom: 2rem !important;
    background: transparent !important;
}

html[dir='rtl'] .table thead th {
    background-color: #f8f9fa !important;
    color: #495057 !important;
    font-weight: 700 !important;
    border-top: none !important;
    border-bottom: 2px solid #e9ecef !important;
    padding: 8px 15px !important;
    font-size: 0.65rem !important;
    /* Reduced by ~2px from 0.78rem */
}

html[dir='rtl'] .table tbody tr {
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease, opacity 0.25s ease !important;
    background-color: #fff !important;
}

html[dir='rtl'] .table tbody tr:hover {
    background-color: #fcfcfc !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05) !important;
    transform: scale(1.002);
}

html[dir='rtl'] .table tbody td {
    padding: 14px 15px !important;
    vertical-align: middle !important;
    border-top: 1px solid #f1f3f5 !important;
    font-size: 0.68rem !important;
    /* Reduced by ~2px from 0.8rem */
    color: #555 !important;
}

/* Responsive Table Container Styling */
html[dir='rtl'] .table-responsive {
    border-radius: 2px !important;
    overflow: hidden !important;
    /* border: 1px solid #eef0f2 !important; */
}

/* SweetAlert 1 RTL Button Order Fix */
html[dir='rtl'] .swal-footer {
    display: flex !important;
    flex-direction: row-reverse !important;
    /* Maintain the requested swap in RTL */
}

/* Premium Global Header & Body Styling */
html[dir='rtl'] .content-body .card {
    border-radius: 2px !important;
    overflow: hidden !important;
    border: none !important;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.04) !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

html[dir='rtl'] .content-body .card-header {
    border-bottom: 1px solid #f8f9fa !important;
    background-color: #fff !important;
    padding: 1.5rem 1.5rem 0.5rem !important;
}

/* Modal RTL Fixes - Ensuring Close button on left and labels on right */
html[dir="rtl"] .modal-header,
[data-textdirection="rtl"] .modal-header {
    flex-direction: row !important;
    /* Title Right, Close Left */
    justify-content: space-between !important;
}

html[dir="rtl"] .modal-header .close,
[data-textdirection="rtl"] .modal-header .close {
    margin: 0 !important;
    float: left !important;
    padding: 1rem !important;
    order: -1 !important;
    /* Force to the far left in RTL */
    display: flex !important;
    align-items: center !important;
}

html[dir="rtl"] .modal-title,
[data-textdirection="rtl"] .modal-title {
    text-align: right !important;
    order: 1 !important;
}

html[dir="rtl"] label,
[data-textdirection="rtl"] label {
    text-align: right !important;
    display: inline-block !important;
    width: 100% !important;
}

/* Modal Pop Animation - Smoother & Simpler */
/* Modal Pop Animation - Simpler & Snappier */
html[dir='rtl'] .modal-pop.fade .modal-dialog {
    transform: translateY(-20px) !important;
    opacity: 0 !important;
    transition: transform 0.2s ease-out, opacity 0.2s linear !important;
}

html[dir='rtl'] .modal-pop.show .modal-dialog {
    transform: translateY(0) !important;
    opacity: 1 !important;
}

/* Minimalist Modal Styling */
html[dir='rtl'] .modal-content {
    border: none !important;
    border-radius: 2px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    background-color: #ffffff !important;
}

/* Premium Language Switcher - Glassmorphism Style */
html[dir='rtl'] .language-switcher-premium {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    /* Increased visibility for a sharper look */
    padding: 6px 14px;
    border-radius: 50px;
    transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0,
            0.2, 1), opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin: 0 10px;
}

html[dir='rtl'] [data-textdirection="rtl"] .language-switcher-premium {
    flex-direction: row-reverse;
}

html[dir='rtl'] .language-switcher-premium:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border-color: rgba(255, 255, 255, 1);
}

html[dir='rtl'] .language-switcher-premium .flag-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 2px solid #fff;
}

html[dir='rtl'] .language-switcher-premium .lang-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #444;
    margin: 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Premium User Pill - Navbar (Refined & Distinct) */
html[dir='rtl'] .premium-user-pill {
    display: flex;
    align-items: center;
    background: #ffffff;
    /* Solid high-quality background */
    border: 1px solid #e2e8f0;
    /* Sharp professional border */
    padding: 6px 6px 6px 8px;
    border-radius: 6px;
    /* Less rounded for more corporate feel */
    transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0,
            0.2, 1), opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    margin-top: 2px;
    /* 2px margin from top as requested */
}

html[dir='rtl'] [data-textdirection="rtl"] .premium-user-pill {
    padding: 6px 8px 6px 6px;
}

html[dir='rtl'] .premium-user-pill:hover {
    background: #fdfdfd;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06), 0 5px 10px rgba(0, 0, 0, 0.02);
    transform: translateY(-2px);
    border-color: #cbd5e1;
}

html[dir='rtl'] .user-info-text {
    flex-direction: column;
    align-items: flex-start;
    margin-right: 15px;
    line-height: 1.1;
}

html[dir='rtl'] [data-textdirection="rtl"] .user-info-text {
    margin-right: 0;
    margin-left: 15px;
    align-items: flex-end;
}

html[dir='rtl'] .greeting-text {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 2px;
}

html[dir='rtl'] .user-name-text {
    font-size: 0.95rem;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: -0.3px;
}

html[dir='rtl'] .avatar-wrapper-premium {
    position: relative;
    display: flex;
}

html[dir='rtl'] .avatar-img-premium,
.avatar-initials-premium {
    width: 42px;
    /* Slightly larger for presence */
    height: 42px;
    border-radius: 2px;
    /* Matching the card radius */
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

html[dir='rtl'] .avatar-initials-premium {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
}

html[dir='rtl'] .avatar-status-online {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #10b981;
    border: 2px solid #fff;
    border-radius: 50%;
    z-index: 2;
}

html[dir='rtl'] [data-textdirection="rtl"] .avatar-status-online {
    right: auto;
    left: -2px;
}

html[dir='rtl'] .chevron-icon {
    font-size: 0.8rem !important;
    color: #94a3b8;
    transition: transform 0.15s ease;
}

html[dir='rtl'] .dropdown.show .chevron-icon {
    transform: rotate(180deg);
}

/* Dark Navbar Support */
html[dir='rtl'] .header-navbar.navbar-semi-dark .premium-user-pill {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

html[dir='rtl'] .header-navbar.navbar-semi-dark .user-name-text {
    color: #f8fafc;
}

html[dir='rtl'] .header-navbar.navbar-semi-dark .greeting-text {
    color: #64748b;
}

html[dir='rtl'] .header-navbar.navbar-semi-dark .avatar-img-premium,
html[dir='rtl'] .header-navbar.navbar-semi-dark .avatar-initials-premium {
    border-color: #334155;
}

/* Dark Navbar adjustments */
html[dir='rtl'] .header-navbar.navbar-semi-dark .language-switcher-premium .lang-name {
    color: #fff;
}

html[dir='rtl'] .header-navbar.navbar-semi-dark .language-switcher-premium {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}

html[dir='rtl'] .modal-header {
    border-bottom: none !important;
    padding: 1.25rem 1.5rem 0.5rem 1.5rem !important;
    background-color: transparent !important;
    position: relative !important;
    /* Ensure children can be positioned absolutely */
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    /* Title starts from right */
}

html[dir='rtl'] .modal-footer {
    border-top: none !important;
    padding: 0.5rem 1.5rem 1.25rem 1.5rem !important;
    background-color: transparent !important;
}

html[dir='rtl'] .modal-body {
    padding: 0.5rem 1.5rem !important;
}

html[dir='rtl'] .modal .form-group {
    margin-bottom: 0.8rem !important;
}

html[dir='rtl'] .modal .row {
    margin-bottom: 0.2rem !important;
}

html[dir='rtl'] .modal-title {
    font-weight: 800 !important;
    color: #1a1a1a !important;
    font-size: 1.25rem !important;
    letter-spacing: -0.5px;
    text-align: right !important;
    width: 100% !important;
    margin: 0 !important;
    /* Reset margin for alignment */
}

html[dir='rtl'] .modal-title i {
    margin-right: 0 !important;
    margin-left: 10px !important;
}

/* Ensure backdrop is subtle */
html[dir='rtl'] .modal-backdrop.show {
    opacity: 0.4 !important;
}

/* ==========================================================================
Premium Role Switch Toggle & Permission Cards
========================================================================== */
html[dir='rtl'] .permission-group-card {
    border-radius: 2px !important;
    border: none !important;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, .04) !important;
    overflow: hidden;
    height: 100%;
    background: #fff;
    margin-bottom: 2rem;
}

html[dir='rtl'] .permission-group-header {
    background: #fcfcfc;
    padding: 15px 8px;
    border-bottom: 1px solid #f1f3f5;
    display: flex;
    align-items: center;
    gap: 8px;
}

html[dir='rtl'] .permission-group-header i {
    font-size: 1.3rem;
    color: #1e9ff2;
}

html[dir='rtl'] .permission-group-header h5 {
    margin: 0;
    font-weight: 700;
    color: #404e67;
    font-size: 1rem;
    letter-spacing: -0.2px;
}

html[dir='rtl'] .premium-switch-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 8px;
    border-bottom: 1px solid #f8f9fa;
    transition: background 0.2s ease;
}

html[dir='rtl'] .premium-switch-item:last-child {
    border-bottom: none;
}

html[dir='rtl'] .premium-switch-item:hover {
    background: #fafafa;
}

html[dir='rtl'] .premium-switch-item .switch-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555e6d;
}




/* Premium Disabled State for Inputs */
html[dir='rtl'] .form-control:disabled,
.form-control[readonly] {
    background-color: #fcfcfc !important;
    color: #94a3b8 !important;
    border-color: #e2e8f0 !important;
    cursor: not-allowed !important;
    opacity: 0.8;
}

/* ==========================================================================
Premium Save Button & Spinner Animation
========================================================================== */
/* Premium Buttons Base */
html[dir='rtl'] .btn-premium-save,
.btn-premium-add,
.btn-premium-blue {
    border: none !important;
    border-radius: 2px !important;
    padding: 10px 24px !important;
    color: #fff !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;

    gap: 8px !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease !important;
    height: 42px !important;
    cursor: pointer;
    text-decoration: none !important;
}

/* Professional Save/Update Button (Vibrant Blue) */
html[dir='rtl'] .btn-premium-save,
.btn-premium-blue {
    background: #1e9ff2 !important;
    box-shadow: 0 4px 8px rgba(30, 159, 242, 0.2) !important;
}

html[dir='rtl'] .btn-premium-save:hover,
.btn-premium-blue:hover {
    background: #168ad4 !important;
    box-shadow: 0 6px 15px rgba(30, 159, 242, 0.3) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

/* Premium Add Button (Sophisticated Indigo) */
html[dir='rtl'] .btn-premium-add {
    background: #7367f0 !important;
    box-shadow: 0 4px 10px rgba(115, 103, 240, 0.15) !important;
}

html[dir='rtl'] .btn-premium-add:hover {
    background: #5e50ee !important;
    box-shadow: 0 6px 15px rgba(115, 103, 240, 0.25) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

html[dir='rtl'] .btn-premium-save i,
.btn-premium-add i,
.btn-premium-blue i {
    font-size: 1.25rem !important;
    line-height: 1;
}

/* Standardized Cancel Button */
html[dir='rtl'] .btn-light-dark {
    height: 42px !important;
    border-radius: 2px !important;
    display: inline-flex !important;
    align-items: center !important;

    font-weight: 600 !important;
}

/* Smooth Spinner Animation */
html[dir='rtl'] .spinner_loading {
    animation: spin-premium 1.2s linear infinite;
}

@keyframes spin-premium {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
Premium Navbar Components (Notifications, Messages, User Dropdown)
========================================================================== */

html[dir='rtl'] .navbar-dropdown {
    border: none !important;
    border-radius: 2px !important;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15) !important;
}

/* Fix Header Background Flicker on Mobile/Resize */
html[dir='rtl'] .header-navbar,
html[dir='rtl'] .header-navbar .navbar-wrapper,
html[dir='rtl'] .header-navbar .navbar-header,
html[dir='rtl'] .header-navbar .navbar-container,
html[dir='rtl'] .header-navbar .navbar-collapse {
    background-color: #ffffff !important;
    background: #ffffff !important;
    transition: none !important;
}

/* Specific fix for the 'semi-dark' logic in modern-admin templates */
html[dir='rtl'] html body .header-navbar.navbar-semi-dark .navbar-header,
html[dir='rtl'] html body .header-navbar.navbar-semi-dark .navbar-wrapper,
html[dir='rtl'] html body .header-navbar.navbar-dark .navbar-header {
    background-color: #ffffff !important;
    background: #ffffff !important;
}

@media (max-width: 767.98px) {

    .header-navbar .navbar-header,
    .header-navbar .navbar-wrapper {
        background-color: #ffffff !important;
        background: #ffffff !important;
    }
}

/* Adjust Mobile Navbar Toggle (Ellipsis) */
html[dir='rtl'] .open-navbar-container i {
    font-size: 1.6rem !important;
    /* Increased by ~2px */
    position: relative;
    top: 2px;
    /* Moved down by 2px */
}

html[dir='rtl'] .navbar-dropdown {
    padding: 10px !important;
    min-width: 240px !important;
    margin-top: 15px !important;
    background: #fff !important;
    animation: dropdownPopFade 0.15s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes dropdownPopFade {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }

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

html[dir='rtl'] .dropdown-header-premium {
    padding: 15px !important;
    border-radius: 2px !important;
    background: linear-gradient(135deg, #f8faff 0%, #f1f4ff 100%) !important;
    margin-bottom: 10px !important;
    text-align: center;
}

html[dir='rtl'] .dropdown-header-premium .user-name {
    display: block;
    font-weight: 800 !important;
    color: #1a1f26 !important;
    font-size: 1.1rem !important;
    margin-bottom: 2px;
}

html[dir='rtl'] .dropdown-header-premium .user-email {
    display: block;
    font-size: 0.8rem !important;
    color: #64748b !important;
    font-weight: 500;
}

html[dir='rtl'] .premium-dropdown-item {
    padding: 12px 20px !important;
    border-radius: 2px !important;
    display: flex !important;
    align-items: center !important;
    color: #475569 !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

html[dir='rtl'] .premium-dropdown-item i {
    font-size: 1.2rem !important;
    margin-right: 8px !important;
    color: #6366f1 !important;
}

html[dir='rtl'] .premium-dropdown-item.logout-item:hover {
    background: #fff1f1 !important;
    color: #ff5b5c !important;
}

html[dir='rtl'] .premium-dropdown-item.logout-item i {
    color: #ff5b5c !important;
}

/* Premium Preview List (Notifications & Messages) */
html[dir='rtl'] .navbar-dropdown.preview-list {
    min-width: 350px !important;
    padding: 0 !important;
    overflow: hidden !important;
}

html[dir='rtl'] .dropdown-header-main {
    padding: 15px 8px !important;
    display: flex !important;
    align-items: center !important;

    background: #fff !important;
    border-bottom: 1px solid #f1f4f9 !important;
}

html[dir='rtl'] .dropdown-header-main .header-title {
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    color: #1a1f26 !important;
    margin: 0 !important;
}

html[dir='rtl'] .premium-badge-count {
    background: rgba(99, 102, 241, 0.1) !important;
    color: #6366f1 !important;
    padding: 3px 10px !important;
    border-radius: 2px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
}

html[dir='rtl'] .preview-item-premium {
    padding: 15px 8px !important;
    display: flex !important;
    align-items: flex-start !important;
    border-bottom: 1px solid #f1f4f9 !important;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease !important;
    text-decoration: none !important;
    background: #fff !important;
}

html[dir='rtl'] .preview-item-premium:hover {
    background: #f9faff !important;
}

html[dir='rtl'] .preview-item-premium:last-child {
    border-bottom: none !important;
}

html[dir='rtl'] .preview-thumbnail-premium {
    width: 38px !important;
    height: 38px !important;
    border-radius: 2px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    margin-right: 15px !important;
    flex-shrink: 0 !important;
}

html[dir='rtl'] .preview-thumbnail-premium i {
    font-size: 1.1rem !important;
    color: #fff !important;
    line-height: 38px !important;
    display: block !important;
    text-align: center !important;
    margin: 0 !important;
}

html[dir='rtl'] .preview-item-content-premium {
    flex-grow: 1 !important;
    overflow: hidden !important;
}

html[dir='rtl'] .preview-item-content-premium .subject {
    display: block !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: #1a1f26 !important;
    margin-bottom: 3px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

html[dir='rtl'] .preview-item-content-premium .message-text {
    display: block !important;
    font-size: 0.8rem !important;
    color: #64748b !important;
    margin-bottom: 5px !important;
    line-height: 1.4 !important;
}

html[dir='rtl'] .preview-item-content-premium .time {
    display: block !important;
    font-size: 0.7rem !important;
    color: #94a3b8 !important;
    font-weight: 500 !important;
}

html[dir='rtl'] .dropdown-footer-premium {
    padding: 8px !important;
    text-align: center !important;
    background: #f8faff !important;
    border-top: 1px solid #f1f4f9 !important;
}

html[dir='rtl'] .dropdown-footer-premium a {
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    color: #6366f1 !important;
    text-decoration: none !important;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease !important;
}

html[dir='rtl'] .dropdown-footer-premium a:hover {
    color: #4f46e5 !important;
}

/* RTL Support Override for Shared Block */
html[dir='rtl'] [data-textdirection="rtl"] .premium-dropdown-item:hover {
    padding-left: 15px !important;
    padding-right: 8px !important;
}

html[dir='rtl'] [data-textdirection="rtl"] .premium-dropdown-item i {
    margin-right: 0 !important;
    margin-left: 8px !important;
}

html[dir='rtl'] [data-textdirection="rtl"] .preview-item-premium {
    /* flex-direction: row-reverse !important; */
    text-align: right !important;
}

html[dir='rtl'] [data-textdirection="rtl"] .preview-thumbnail-premium {
    margin-right: 0 !important;
    margin-left: 15px !important;
}

html[dir='rtl'] [data-textdirection="rtl"] .preview-item-content-premium {
    text-align: right !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .navbar-dropdown {
        min-width: 280px !important;
    }

    .preview-item-premium {
        padding: 10px 15px !important;
    }
}

/* ==========================================================================
Premium Messages Center
========================================================================== */

html[dir='rtl'] .msg-sidebar-card {
    border: none !important;
    border-radius: 2px !important;
    background: #fff !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04) !important;
    overflow: hidden !important;
    min-height: 600px !important;
}

html[dir='rtl'] .msg-sidebar-btn {
    padding: 8px !important;
    border-radius: 2px !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3) !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease !important;
}

html[dir='rtl'] .msg-sidebar-btn i {
    margin-right: 0 !important;
    margin-left: 6px !important;
}

html[dir='rtl'] .msg-sidebar-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 15px rgba(99, 102, 241, 0.4) !important;
    color: #fff !important;
}

html[dir='rtl'] .msg-nav-link {
    padding: 8px 8px !important;
    margin: 6px 15px !important;
    border-radius: 2px !important;
    color: #475569 !important;
    font-weight: 600 !important;
    font-size: 1.1rem !important;
    transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    align-items: center !important;
    border: 1px solid transparent !important;
    position: relative;
    text-decoration: none !important;
}

html[dir='rtl'] .msg-nav-link:hover {
    background: rgba(99, 102, 241, 0.04) !important;
    color: #4f46e5 !important;
    transform: translateX(-5px);
}

html[dir='rtl'] .msg-nav-link.active {
    background: linear-gradient(-90deg, rgba(99, 102, 241, 0.08) 0%, rgba(255, 255, 255, 0) 100%) !important;
    color: #4338ca !important;
    border-right: 3px solid #6366f1 !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.02);
}

/* Icon Colors & Animations */
html[dir='rtl'] .msg-nav-link i {
    font-size: 1.3rem !important;
    margin-left: 10px !important;
    margin-right: 0 !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease !important;
}

html[dir='rtl'] .msg-nav-link[wire\:click*="inbox"] i {
    color: #6366f1 !important;
}

html[dir='rtl'] .msg-nav-link[wire\:click*="sent"] i {
    color: #0ea5e9 !important;
}

html[dir='rtl'] .msg-nav-link[wire\:click*="starred"] i {
    color: #f59e0b !important;
}

html[dir='rtl'] .msg-nav-link[wire\:click*="trash"] i {
    color: #f43f5e !important;
}

html[dir='rtl'] .msg-nav-link:hover i {
    transform: scale(1.2);
}

html[dir='rtl'] .msg-main-card {
    border: none !important;
    border-radius: 2px !important;
    background: #fff !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04) !important;
    min-height: 600px !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

html[dir='rtl'] .msg-card-header-premium {
    padding: 8px 25px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    background: #fff !important;
    border-top-left-radius: 8px !important;
    border-top-right-radius: 8px !important;
}

html[dir='rtl'] .msg-count-badge {
    background: #f1f5f9 !important;
    color: #64748b !important;
    padding: 2px 10px !important;
    border-radius: 2px !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease !important;
}

html[dir='rtl'] .msg-nav-link.active .msg-count-badge {
    background: #6366f1 !important;
    color: #fff !important;
}

html[dir='rtl'] .msg-badge-new {
    background: #6366f1 !important;
    color: #fff !important;
    padding: 2px 8px !important;
    border-radius: 2px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
}

html[dir='rtl'] .msg-star {
    color: #cbd5e1 !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease !important;
    font-size: 1.25rem !important;
}

html[dir='rtl'] .msg-star.starred {
    color: #f59e0b !important;
}

html[dir='rtl'] .msg-star:hover {
    transform: scale(1.1) !important;
}

html[dir='rtl'] .message-meta-box {
    background: #f8fafc !important;
    padding: 15px !important;
    border-radius: 2px !important;
    border: 1px solid #f1f5f9 !important;
}

html[dir='rtl'] .message-body-content {
    background: #fff !important;
    padding: 25px !important;
    border-radius: 2px !important;
    border: 1px solid #f1f5f9 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02) !important;
    line-height: 1.8 !important;
    color: #334155 !important;
}

/* RTL Support for Messages */
html[dir='rtl'] [data-textdirection="rtl"] .msg-nav-link i {
    margin-right: 0 !important;
    margin-left: 8px !important;
}

html[dir='rtl'] [data-textdirection="rtl"] .msg-badge-new {
    margin-left: 0 !important;
    margin-right: 8px !important;
}

/* Message Center UI Utilities */
html[dir='rtl'] .col-w-45 {
    width: 45px !important;
}

html[dir='rtl'] .col-w-80 {
    width: 80px !important;
}

html[dir='rtl'] .col-w-120 {
    width: 18px !important;
}

html[dir='rtl'] .col-w-150 {
    width: 150px !important;
}

html[dir='rtl'] .col-w-200 {
    width: 200px !important;
}

html[dir='rtl'] .col-max-200 {
    max-width: 200px !important;
}

html[dir='rtl'] .avatar-icon-box-md {
    width: 50px !important;
    height: 50px !important;
}

html[dir='rtl'] .empty-state-icon-lg {
    font-size: 5rem !important;
}

html[dir='rtl'] .recipients-list-container {
    max-height: 48px;
}

html[dir='rtl'] .pt-11px {
    padding-top: 11px !important;
}

/* Compose Modal Redesign Styles (Migrated) */
html[dir='rtl'] .compose-row-container {
    min-height: 58px;
    border-radius: 6px;
}

html[dir='rtl'] .bg-premium-sidebar {
    background: linear-gradient(180deg, #f8faff 0%, #ffffff 100%);
}

html[dir='rtl'] .main-form-area {
    background: #ffffff;
}

html[dir='rtl'] .text-indigo-dark {
    color: #4338ca;
}

html[dir='rtl'] .text-dark-blue {
    color: #1e293b;
}

html[dir='rtl'] .text-muted-2 {
    color: #94a3b8;
}

html[dir='rtl'] .bg-indigo {
    background-color: #6366f1;
}

html[dir='rtl'] .text-indigo {
    color: #6366f1;
}

html[dir='rtl'] .glass-header {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    z-index: 10;
}

html[dir='rtl'] .glass-footer {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
}

html[dir='rtl'] .premium-search-bar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
}

html[dir='rtl'] .premium-search-bar:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1) !important;
}

html[dir='rtl'] .premium-input-wrapper,
.premium-textarea-wrapper {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

html[dir='rtl'] .form-group-premium:focus-within .premium-input-wrapper,
html[dir='rtl'] .form-group-premium:focus-within .premium-textarea-wrapper {
    border-color: #6366f1;
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.08), 0 4px 6px -2px rgba(99, 102, 241, 0.05) !important;
    transform: translateY(-1px);
}

html[dir='rtl'] .recipient-card {
    background: #ffffff;
    border: 1px solid transparent !important;
    padding: 10px 15px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    margin-bottom: 8px;
}

html[dir='rtl'] .recipient-card.card-selected {
    background: #f0f4ff !important;
    border-color: #c7d2fe !important;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.08);
}

html[dir='rtl'] .recipient-card.card-selected::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #6366f1;
    border-radius: 0 4px 4px 0;
}


html[dir='rtl'] .premium-broadcast-box {
    background: linear-gradient(135deg, #f8faff 0%, #eff6ff 100%);
    border-radius: 6px;
    padding: 24px !important;
    border: 1px dashed #bfdbfe;
    transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

html[dir='rtl'] .premium-broadcast-box:has(.custom-control-input:checked) {
    background: linear-gradient(135deg, #f0f4ff 0%, #e0e7ff 100%) !important;
    border-color: #6366f1 !important;
    border-style: solid !important;
    box-shadow: 0 10px 8px -5px rgba(99, 102, 241, 0.15) !important;
    transform: translateY(-2px);
}

html[dir='rtl'] .icon-orb {
    width: 44px;
    height: 44px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

html[dir='rtl'] .broadcast-icon-box {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #6366f1, #3b82f6);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

html[dir='rtl'] .shadow-pulse {
    animation: pulse-indigo 2.5s infinite;
}

@keyframes pulse-indigo {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(99, 102, 241, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

html[dir='rtl'] .selection-counter-premium {
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
    border: 1.5px solid #e0e7ff;
    padding: 10px 8px;
    border-radius: 6px;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

html[dir='rtl'] .border-msg-sidebar {
    border-right: 1px solid #f1f5f9;
}

html[dir='rtl'] [dir="rtl"] .border-msg-sidebar,
html[dir='rtl'] [data-textdirection="rtl"] .border-msg-sidebar {
    border-right: none;
    border-left: 1px solid #f1f5f9;
}

html[dir='rtl'] .btn-premium-send {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border: none;
    color: #ffffff;
    border-radius: 2px;
    padding: 8px 28px;
    transition: background-color 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

html[dir='rtl'] .btn-premium-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    color: #ffffff;
}

html[dir='rtl'] .btn-premium-send:active {
    transform: scale(0.96);
}

html[dir='rtl'] .btn-premium-ghost-indigo {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.03);
    border: 1px solid transparent;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.15s, opacity 0.15s;
    border-radius: 2px;
}

html[dir='rtl'] .btn-premium-ghost-indigo:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
    color: #4f46e5;
    transform: translateY(-1px);
}

html[dir='rtl'] .btn-premium-danger-soft {
    background: #fff1f2;
    color: #e11d48;
    border: 1px solid #ffe4e6;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(225, 29, 72, 0.05);
}

html[dir='rtl'] .btn-premium-danger-soft:hover {
    background: #ffe4e6;
    color: #be123c;
    border-color: #fecdd3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(225, 29, 72, 0.1);
}

html[dir='rtl'] .custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

html[dir='rtl'] .custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

html[dir='rtl'] .custom-scrollbar::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 2px;
}

html[dir='rtl'] .custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

html[dir='rtl'] .transition-all-300 {
    transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0,
            0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

html[dir='rtl'] .letter-spacing-2 {
    letter-spacing: 1px;
}

html[dir='rtl'] .no-resize {
    resize: none;
}

html[dir='rtl'] .scale-110 {
    transform: scale(1.1);
}

html[dir='rtl'] .fade-in {
    animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

html[dir='rtl'] .custom-control-indigo .custom-control-label::before {
    border-radius: 6px;
    border: 2px solid #cbd5e1;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s, opacity 0.2s;
    width: 1.25rem !important;
    height: 1.25rem !important;
}

html[dir='rtl'] .custom-control-indigo .custom-control-input:checked~.custom-control-label::before {
    background-color: #6366f1 !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

html[dir='rtl'] .custom-control-indigo .custom-control-input:checked~.custom-control-label::after {
    background-image: var(--icon-tick-white) !important;
    background-size: 80% !important;
    width: 1.25rem !important;
    height: 1.25rem !important;
}

html[dir='rtl'] .scale-125 {
    transform: scale(1.25);
}

/* RTL Specific Tweaks for Sidebar */
html[dir='rtl'] [data-textdirection="rtl"] .recipient-card:hover {
    transform: translateX(-5px) scale(1.01);
}

/* Premium Tabs System (Employees Module) - RTL */
html[dir='rtl'] .premium-tabs-wrapper {
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(15px);
    border-radius: 50px;
    padding: 6px;
    margin: 0 auto 3rem;
    border: 1px solid rgba(99, 102, 241, 0.15);
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.05);
    width: max-content;
    max-width: 100%;
}

html[dir='rtl'] .premium-tabs {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px;
}

/* Premium Tabs System (Employees Module) - RTL */
html[dir='rtl'] .premium-tabs-wrapper {
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(15px);
    border-radius: 50px;
    padding: 6px;
    margin: 0 auto 3rem;
    border: 1px solid rgba(99, 102, 241, 0.15);
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.05);
    width: max-content;
    max-width: 100%;
}

html[dir='rtl'] .premium-tabs {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px;
}

html[dir='rtl'] .premium-tab-item {
    display: block;
}

html[dir='rtl'] .premium-tab-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 50px;
    color: #64748b;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none !important;
    transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0,
            0.2, 1), opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    background: transparent;
    border: none;
}

html[dir='rtl'] .premium-tab-link i {
    font-size: 1.4rem !important;
    margin-bottom: 0 !important;
    display: inline-block !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

html[dir='rtl'] .premium-tab-link:hover {
    color: #4338ca;
    background: rgba(99, 102, 241, 0.08);
    transform: translateY(-1px);
}

html[dir='rtl'] .premium-tab-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    box-shadow: 0 10px 8px -5px rgba(79, 70, 229, 0.4);
    transform: translateY(-2px);
}

html[dir='rtl'] .premium-tab-link.active i {
    color: #ffffff;
    transform: scale(1.1);
}

/* Form Components Upgrade - RTL Mirror */
html[dir='rtl'] .premium-form-group {
    margin-bottom: 1.25rem !important;
}


html[dir='rtl'] select.premium-input,
html[dir='rtl'] select.form-control.premium-input {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background: #ffffff !important;
    background-image: var(--icon-chevron-indigo) !important;
    background-repeat: no-repeat !important;
    background-position: left 1.25rem center !important;
    /* Arrow on the left in RTL */
    background-size: 1.2rem !important;
    padding-left: 3.2rem !important;
    padding-right: 1.25rem !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 2px !important;
    height: 3rem !important;
    font-size: 1.0rem !important;
    /* Reduced by 2px from 1.15rem */
    font-weight: 500 !important;
    color: #1e293b !important;
}

html[dir='rtl'] input.premium-input {
    background: #ffffff !important;
    background-image: none !important;
    padding-right: 0.75rem !important;
    padding-left: 0.75rem !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 2px !important;
    height: 3rem !important;

    .premium-label {
        display: block !important;
        font-size: 0.85rem !important;
        /* Smaller like Properties */
        font-weight: 600 !important;
        color: #475569 !important;
        /* Muted Slate 600 */
        margin-bottom: 0.4rem !important;
        text-align: inherit !important;
        transition: color 0.2s ease !important;
    }

    font-size: 1.0rem !important;
    font-weight: 500 !important;
    color: #1e293b !important;
    line-height: 3rem !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.premium-input.is-invalid-premium,
input.is-invalid-premium,
select.is-invalid-premium,
.is-invalid-premium .select2-selection--single,
.is-invalid-premium.select2-container--default .select2-selection--single {
    border: 1.5px solid #ef4444 !important;
    background-color: #fff5f5 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15) !important;
}

html[dir='rtl'] .form-control.premium-input:not(select):not(input) {
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 2px !important;
    height: 3rem !important;
    display: flex !important;
    align-items: center !important;
}

/* ==========================================================================
PREMIUM FILE INPUT (RTL) - ULTIMATE CUSTOM UI
(Scoped strictly to .premium-input-wrapper to avoid breaking plugins like Krajee)
========================================================================== */
html[dir='rtl'] .premium-input-wrapper:has(input[type="file"]) {
    position: relative !important;
    overflow: hidden !important;
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 2px !important;
    height: 3rem !important;
    cursor: pointer !important;
}

/* 1. The Real Hidden Input (Handles clicking/files) */
html[dir='rtl'] .premium-input-wrapper input[type="file"].premium-input {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    cursor: pointer !important;
    z-index: 10 !important;
}

/* 2. The Custom 'Button' on the Right */
html[dir='rtl'] .premium-input-wrapper:has(input[type="file"].premium-input)::after {
    content: "Ø§Ø®ØªØ± Ø§Ù„Ù…Ù„Ù";
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 8rem;
    background: #6366f1;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    z-index: 2;
    transition: background 0.15s ease;
}

/* 3. The Custom Placeholder Text */
html[dir='rtl'] .premium-input-wrapper:has(input[type="file"].premium-input)::before {
    content: "Ø§Ø¯Ø®Ù„ Ø§Ù„Ù…Ù„Ù...";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 9rem;
    color: #94a3b8;
    font-size: 1rem;
    z-index: 1;
}

/* 4. The Icon (Anchored inside the button) */
html[dir='rtl'] [data-textdirection="rtl"] .premium-input-wrapper:has(input[type="file"].premium-input) i {
    position: absolute !important;
    right: 0.8rem !important;
    /* left: auto !important; */
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #ffffff !important;
    z-index: 3 !important;
    font-size: 1.3rem !important;
    pointer-events: none;
}

html[dir='rtl'] .premium-input-wrapper:has(input[type="file"].premium-input):hover::after {
    background: #4f46e5;
}

html[dir='rtl'] .premium-form-group label,
[data-textdirection='rtl'] .premium-form-group label {
    text-align: right !important;
    display: block !important;
    width: 100% !important;
    font-size: 1.1rem !important;
    /* Unified increase */
}

html[dir='rtl'] .premium-form-group {
    margin-bottom: 1.25rem !important;
}

/* ==========================================================================
MINIMALIST KRAJEE FILE INPUT BUTTONS (RTL)
========================================================================== */
html[dir='rtl'] .file-input .btn-primary,
html[dir='rtl'] .file-input .btn-danger {
    height: 40px !important;
    border-radius: 2px !important;
    padding: 0 18px !important;
    display: inline-flex !important;
    align-items: center !important;

    gap: 8px !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease, opacity 0.25s ease !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
}

/* Browse Button - Ghost Style */
html[dir='rtl'] .file-input .btn-primary {
    background: rgba(99, 102, 241, 0.06) !important;
    color: #6366f1 !important;
    border-color: rgba(99, 102, 241, 0.1) !important;
}

html[dir='rtl'] .file-input .btn-primary:hover {
    background: #6366f1 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* Delete Button - Ghost Style */
html[dir='rtl'] .file-input .btn-danger {
    background: rgba(239, 68, 68, 0.06) !important;
    color: #ef4444 !important;
    border-color: rgba(239, 68, 68, 0.1) !important;
    margin-right: 4px !important;
}

html[dir='rtl'] [data-textdirection="rtl"] .file-input .btn-danger {
    margin-right: 0 !important;
    margin-left: 4px !important;
}

html[dir='rtl'] .file-input .btn-danger:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* Input Caption (Text area) */
html[dir='rtl'] .file-input .input-group>.form-control {
    border-radius: 2px !important;
    height: 40px !important;
    background: #fcfdfe !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
}

html[dir='rtl'] .file-input .input-group {
    gap: 4px !important;
    align-items: center !important;
}

/* Hide redundant caption icon that appears on the left in RTL */
html[dir='rtl'] .file-caption-icon {
    display: none !important;
}

html[dir='rtl'] .file-input .file-caption-main {
    width: 100% !important;
}

/* ==========================================================================
PREMIUM SELECT FIX (STABLE)
========================================================================== */
html[dir='rtl'] select.premium-input {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: var(--icon-chevron-indigo) !important;
    background-repeat: no-repeat !important;
    background-position: left 1.2rem center !important;
    background-size: 1.1rem !important;
    padding-left: 3rem !important;
    padding-right: 1.25rem !important;
    width: 100% !important;
}

html[dir='rtl'] select.premium-input option {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #1e293b !important;
}

html[dir='rtl'] [data-textdirection="ltr"] select.premium-input {
    background-position: right 1.2rem center !important;
    padding-right: 1.25rem !important;
    padding-left: 1.25rem !important;
}

/* Readonly Styling */
html[dir='rtl'] .premium-readonly-wrapper {
    background: #f8fafc !important;
    border-color: #f1f5f9 !important;
    color: #475569 !important;
}

html[dir='rtl'] .premium-readonly-text {
    font-weight: 700 !important;
    color: #1e293b !important;
    font-size: 1rem !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
}

/* Premium Badge Pill Refinement */
html[dir='rtl'] .premium-badge-pill-md {
    font-size: 0.85rem !important;
    font-weight: 800 !important;
    padding: 0.45rem 0.8rem !important;
    background: #6366f1 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3) !important;
    border: none !important;
    line-height: 1 !important;
    min-width: 28px !important;
    text-align: center !important;
    margin-right: 10px !important;
}

html[dir='rtl'] .filter-chip.active .premium-badge-pill-md {
    background: #ffffff !important;
    color: #6366f1 !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
}

html[dir='rtl'] .modal-footer .btn+.btn {
    margin-right: 8px !important;
}

html[dir='rtl'] [data-textdirection="ltr"] .modal-footer .btn+.btn {
    margin-right: 0 !important;
    margin-left: 8px !important;
}

@keyframes premium-dropdown-fade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

html[dir='rtl'] .premium-input:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.08), 0 4px 6px -2px rgba(99, 102, 241, 0.05) !important;
    transform: translateY(-1px);
}

/* Fix Filter Popover Position for RTL */
html[dir='rtl'] [data-textdirection="rtl"] .ptc-query-panel {
    /* left: auto !important; */
    right: 0 !important;
}

/* Fix Filter Chip Spacing for RTL */
html[dir='rtl'] [data-textdirection="rtl"] .filter-chip {
    gap: 8px !important;
}

html[dir='rtl'] [data-textdirection="rtl"] .filter-chip i {
    margin-left: 8px !important;
}

/* Global RTL Icon Spacing Fix for Badges and Tables */
html[dir='rtl'] [data-textdirection="rtl"] .badge i,
html[dir='rtl'] [data-textdirection="rtl"] td i,
html[dir='rtl'] [data-textdirection="rtl"] .modal-info-list i {
    margin-right: 0 !important;
    margin-left: 8px !important;
}

html[dir='rtl'] [data-textdirection="rtl"] .badge i[class*="mr-"],
html[dir='rtl'] [data-textdirection="rtl"] td i[class*="mr-"] {
    margin-right: 0 !important;
    margin-left: 8px !important;
}

/* Standardized Premium Input Wrapper (Directional) */
html[dir='rtl'] .premium-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    height: 3rem;
    /* Force wrapper to match input height for regular inputs */
}

/* When wrapper contains a textarea, allow auto height */
html[dir='rtl'] .premium-input-wrapper:has(textarea) {
    height: auto !important;
    align-items: flex-start !important;
    /* Icon stays at top, not center */
}

/* RTL Icon & Padding (Arabic) */
html[dir='rtl'] [data-textdirection="rtl"] .premium-input-wrapper i,
html[dir='rtl'] html[dir="rtl"] .premium-input-wrapper i {
    position: absolute !important;
    right: 1.15rem !important;
    /* left: auto !important; */
    font-size: 1.25rem !important;
    z-index: 10 !important;
    color: #6366f1 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

/* Icon inside textarea wrapper: pin to top instead of center (RTL) */
html[dir='rtl'] [data-textdirection="rtl"] .premium-input-wrapper:has(textarea) i,
html[dir='rtl'] html[dir="rtl"] .premium-input-wrapper:has(textarea) i {
    top: 1rem !important;
    transform: none !important;
}

html[dir='rtl'] [data-textdirection="rtl"] .premium-input-wrapper .premium-input:not(textarea),
html[dir='rtl'] html[dir="rtl"] .premium-input-wrapper .premium-input:not(textarea) {
    padding-right: 0.75rem !important;
    padding-left: 0.75rem !important;
}

/* ===================================================
Global Textarea Fix inside premium-input-wrapper (RTL)
Textarea never needs icon offset - apply equal padding always
=================================================== */
html[dir='rtl'] [data-textdirection="rtl"] .premium-input-wrapper textarea.premium-input,
html[dir='rtl'] html[dir="rtl"] .premium-input-wrapper textarea.premium-input,
html[dir='rtl'] .premium-input-wrapper textarea.premium-input,
html[dir='rtl'] .premium-input-wrapper.no-icon textarea.premium-input {
    padding: 8px 8px !important;
    height: auto !important;
    min-height: 90px !important;
    line-height: 1.6 !important;
    resize: vertical !important;
    border: none !important;
    background: transparent !important;
    width: 100% !important;
    font-size: 1.05rem !important;
    display: block !important;
    box-shadow: none !important;
}

html[dir='rtl'] .premium-input-wrapper textarea.premium-input::placeholder,
html[dir='rtl'] .premium-input-wrapper.no-icon textarea.premium-input::placeholder {
    color: #94a3b8 !important;
    font-size: 0.95rem !important;
    opacity: 1 !important;
}


html[dir='rtl'] .premium-input-wrapper i:hover {
    transform: scale(1.1);
}


html[dir='rtl'] .error-message-premium {
    color: #ef4444;
    font-size: 0.78rem;
    font-weight: 700;
    margin-top: 0.5rem;
    display: block;
    animation: slideDownRTL 0.15s ease-out;
}

@keyframes slideDownRTL {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

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

/* Animations */
html[dir='rtl'] .step-content-fade {
    animation: fadeInScaleRTL 0.2s ease-out;
}

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

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

/* Photo Upload Preview */
html[dir='rtl'] .premium-photo-container {
    padding: 6px 10px;
    background: #f8fafc;
    border-radius: 6px;
    border: 2px dashed #e2e8f0;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

html[dir='rtl'] .premium-photo-container:hover {
    border-color: #6366f1;
    background: #f1f5f9;
}

html[dir='rtl'] .premium-photo-container .btn-primary {
    padding: 0.5rem 1rem !important;
    font-size: 0.85rem !important;
    border-radius: 2px !important;
}

/* Premium Table Action Buttons - RTL */
html[dir='rtl'] .btn-premium-action {
    width: 35px;
    height: 35px;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    transition: background-color 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.15s cubic-bezier(0.175, 0.885,
            0.32, 1.275), border-color 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.15s cubic-bezier(0.175, 0.885,
            0.32, 1.275), transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.15s cubic-bezier(0.175, 0.885, 0.32,
            1.275) !important;
    border: none !important;
    margin: 0 4px;
}

html[dir='rtl'] .btn-premium-action i {
    font-size: 1.09rem !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;

    width: auto !important;
    height: auto !important;
    line-height: 1 !important;
}

html[dir='rtl'] .btn-premium-action-edit {
    background: rgba(99, 102, 241, 0.08) !important;
    color: #6366f1 !important;
}

html[dir='rtl'] .btn-premium-action-edit:hover {
    background: #6366f1 !important;
    color: #ffffff !important;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 15px rgba(99, 102, 241, 0.3);
}

html[dir='rtl'] .btn-premium-action-danger {
    background: rgba(239, 68, 68, 0.08) !important;
    color: #ef4444 !important;
}

html[dir='rtl'] .btn-premium-action-danger:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 15px rgba(239, 68, 68, 0.3);
}

html[dir='rtl'] .btn-premium-action-info {
    background: rgba(14, 165, 233, 0.08) !important;
    color: #0ea5e9 !important;
}

html[dir='rtl'] .btn-premium-action-info:hover {
    background: #0ea5e9 !important;
    color: #ffffff !important;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 15px rgba(14, 165, 233, 0.3);
}

html[dir='rtl'] .btn-premium-action-warning {
    background: rgba(245, 158, 11, 0.08) !important;
    color: #f59e0b !important;
}

html[dir='rtl'] .btn-premium-action-warning:hover {
    background: #f59e0b !important;
    color: #ffffff !important;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 15px rgba(245, 158, 11, 0.3);
}

html[dir='rtl'] .btn-premium-action-success {
    background: rgba(16, 185, 129, 0.08) !important;
    color: #10b981 !important;
}

html[dir='rtl'] .btn-premium-action-success:hover {
    background: #10b981 !important;
    color: #ffffff !important;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 15px rgba(16, 185, 129, 0.3);
}

html[dir='rtl'] .btn-premium-action-primary {
    background: rgba(139, 92, 246, 0.12) !important;
    color: #8b5cf6 !important;
}

html[dir='rtl'] .btn-premium-action-primary:hover {
    background: #8b5cf6 !important;
    color: #ffffff !important;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 15px rgba(139, 92, 246, 0.3);
}

html[dir='rtl'] .premium-photo-preview {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #ffffff;
    box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Premium Badge Glow & Light Utilities */
html[dir='rtl'] .badge-glow {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

html[dir='rtl'] .badge-light-primary {
    background-color: rgba(30, 159, 242, 0.12) !important;
    color: #1e9ff2 !important;
}

html[dir='rtl'] .badge-light-success {
    background-color: rgba(40, 199, 111, 0.12) !important;
    color: #28c76f !important;
}

html[dir='rtl'] .badge-light-danger {
    background-color: rgba(234, 84, 85, 0.12) !important;
    color: #ea5455 !important;
}

html[dir='rtl'] .badge-light-warning {
    background-color: rgba(255, 159, 67, 0.12) !important;
    color: #ff9f43 !important;
}

html[dir='rtl'] .badge-light-info {
    background-color: rgba(0, 207, 221, 0.12) !important;
    color: #00cfdd !important;
}

html[dir='rtl'] .badge-glow-primary {
    box-shadow: 0 0 8px rgba(30, 159, 242, 0.45) !important;
}

html[dir='rtl'] .badge-glow-success {
    box-shadow: 0 0 8px rgba(40, 199, 111, 0.45) !important;
}

html[dir='rtl'] .badge-glow-danger {
    box-shadow: 0 0 8px rgba(234, 84, 85, 0.45) !important;
}

html[dir='rtl'] .badge-glow-warning {
    box-shadow: 0 0 8px rgba(255, 159, 67, 0.45) !important;
}

html[dir='rtl'] .badge-glow-info {
    box-shadow: 0 0 8px rgba(0, 207, 221, 0.45) !important;
}

/* Premium Card & Layout Optimizations - RTL */
html[dir='rtl'] .premium-card {
    border: none !important;
    border-radius: 2px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04), 0 1px 8px rgba(0, 0, 0, 0.02) !important;
    overflow: hidden;
    background: #ffffff !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

/* html[dir='rtl'] .premium-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06) !important;
} */

html[dir='rtl'] .premium-card .card-header {
    background: transparent !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 1.5rem 2rem !important;
}

html[dir='rtl'] .premium-card .card-title {
    font-weight: 800 !important;
    color: #1e293b !important;
    letter-spacing: -0.025em;
    font-size: 1.25rem !important;
}

/* Premium Table Improvements - RTL */
html[dir='rtl'] .premium-table {
    border-collapse: separate !important;
    border-spacing: 0 8px !important;
}

html[dir='rtl'] .premium-table thead th {
    background-color: #f8fafc !important;
    color: #334155 !important;
    border: none !important;
    padding: 0.8rem 1rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 0.6rem !important;
    /* Reduced by 2px from 0.72rem */
    letter-spacing: 0.05em;
    vertical-align: middle !important;
}

/* Default alignment for RTL */
html[dir='rtl'] .premium-table thead th {
    text-align: right !important;
}

html[dir='rtl'] .premium-table thead th.text-center {
    text-align: center !important;
}

html[dir='rtl'] .premium-table th.col-actions-width,
html[dir='rtl'] .premium-table td.vertical-middle:last-child {
    text-align: center !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    width: 80px !important;
}






/* Mirroring rounded corners for RTL */
html[dir='rtl'] .premium-table thead th:first-child {
    border-radius: 0 8px 8px 0 !important;
}

html[dir='rtl'] .premium-table thead th:last-child {
    border-radius: 6px 0 0 8px !important;
}

/* Basic Responsive Table Styles - RTL */
html[dir='rtl'] .basic-responsive-table {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
}

html[dir='rtl'] .basic-responsive-table thead th {
    background-color: #f8f9fa !important;
    background-image: none !important;
    color: #495057 !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 0 !important;
}

html[dir='rtl'] .basic-responsive-table tbody td {
    border: 1px solid #dee2e6 !important;
}

/* Breadcrumb Modernization - RTL */
html[dir='rtl'] .premium-breadcrumb {
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 2px !important;
    padding: 0.5rem 1.25rem !important;
}

html[dir='rtl'] .premium-breadcrumb .breadcrumb-item+.breadcrumb-item::before {
    content: "\2190" !important;
    color: #6366f1 !important;
    font-weight: bold !important;
    display: inline-block !important;
    transform: none !important;
    background-image: none !important;
    width: auto !important;
    height: auto !important;
}

/* Premium Switch with Embedded SVG Icon - RTL Mirror - Scaled up +5px */
html[dir='rtl'] .premium-switch {
    padding-right: 1.25rem !important;
    padding-left: 0 !important;
    min-height: 1.75rem !important;
    display: inline-flex !important;
    align-items: center;
}

html[dir='rtl'] .premium-switch .custom-control-label::before {
    height: 1.65rem !important;
    width: 3rem !important;
    border-radius: 2rem !important;
    background-color: #e2e8f0 !important;
    border: none !important;
    top: 0 !important;
    right: -3.25rem !important;
    /* left: auto !important; */
    transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

html[dir='rtl'] .premium-switch .custom-control-input:checked~.custom-control-label::before {
    background-color: #6366f1 !important;
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.2) !important;
}

html[dir='rtl'] .premium-switch .custom-control-label::after {
    width: calc(1.65rem - 4px) !important;
    height: calc(1.65rem - 4px) !important;
    background-color: #ffffff !important;
    border-radius: 50% !important;
    top: 2px !important;
    right: calc(-3.25rem + 2px) !important;
    /* left: auto !important; */
    transition: background-color 0.15s cubic-bezier(0.68, -0.55, 0.265, 1.55), color 0.15s cubic-bezier(0.68, -0.55, 0.265,
            1.55), border-color 0.15s cubic-bezier(0.68, -0.55, 0.265, 1.55), box-shadow 0.15s cubic-bezier(0.68, -0.55, 0.265,
            1.55), transform 0.15s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.15s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
    content: "" !important;
}

html[dir='rtl'] .premium-switch .custom-control-input:checked~.custom-control-label::after {
    transform: translateX(-1.35rem) !important;
    background-image: var(--icon-tick-indigo) !important;
    background-size: 8px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* ==========================================================================
Monthly Reports & Premium UI Modernization Classes
========================================================================== */

/* Premium Modal Enhancements */
html[dir='rtl'] .premium-modal-content-styled {
    border-radius: 2px !important;
    overflow: hidden !important;
    border: none !important;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15) !important;
}

html[dir='rtl'] .premium-close-button {
    background: #f3f6f9 !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    line-height: 32px !important;
    margin: 0 !important;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;

}

html[dir='rtl'] .premium-close-button:hover {
    background: #e2e8f0 !important;
    transform: rotate(90deg);
}

/* Clearer Readonly Info Wrappers */
html[dir='rtl'] .premium-readonly-wrapper {
    background-color: #f8f9fa !important;
    border: 1px solid #e4e6ef !important;
    border-radius: 2px !important;
    box-shadow: none !important;
}

html[dir='rtl'] .premium-readonly-text {
    height: 42px !important;
    line-height: 34px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #1a1f26 !important;
}

/* Premium Popover Panels */
html[dir='rtl'] .premium-popover-panel {
    border-radius: 2px !important;
    border: none !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden !important;
    background: #ffffff !important;
}

/* Premium Loop Iteration Badges */
html[dir='rtl'] .premium-badge-circle {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

}

html[dir='rtl'] .premium-badge-total {
    font-size: 1.1rem !important;
    width: 35px !important;
    height: 18px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

}

/* Multi-use Standard Premium Button */
html[dir='rtl'] .btn-premium-standard {
    height: 42px !important;
    border-radius: 2px !important;
    padding: 0 8px !important;
    line-height: 42px !important;
    display: inline-flex !important;
    align-items: center !important;
    font-weight: 600 !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease !important;
}

/* Professional Pill Button - Global Across All Modules */
html[dir='rtl'] .btn-premium-white,
html[dir='rtl'] .btn-premium-back,
html[dir='rtl'] .btn-premium-add,
html[dir='rtl'] .btn-premium-save,
html[dir='rtl'] button.btn-premium-save {
    background: #ffffff !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
    padding: 8px 32px !important;
    border-radius: 50px !important;
    /* Pill shape */
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;

    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.03) !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

html[dir='rtl'] .btn-premium-white:hover,
html[dir='rtl'] .btn-premium-back:hover,
html[dir='rtl'] .btn-premium-add:hover,
html[dir='rtl'] .btn-premium-save:hover,
html[dir='rtl'] button.btn-premium-save:hover {
    background: #f0f9ff !important;
    /* Soft Properties Blue */
    color: #3b82f6 !important;
    /* Properties Primary Blue */
    border-color: #bae6fd !important;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.12) !important;
}

html[dir='rtl'] .btn-premium-white i,
.btn-premium-back i {
    margin-left: 8px;
    font-size: 1.1rem;
}

html[dir='rtl'] [dir="ltr"] .btn-premium-white i,
[dir="ltr"] .btn-premium-back i {
    margin-left: 0;
    margin-right: 8px;
}

html[dir='rtl'] .premium-textarea-md {
    min-height: 18px !important;
    border-radius: 2px !important;
}

html[dir='rtl'] .premium-status-badge {
    padding: 0.5rem 0.8rem !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    letter-spacing: 0.2px !important;
}

html[dir='rtl'] .premium-status-icon {
    font-size: 0.95rem !important;
    font-weight: 800 !important;
}



/* Textarea Placeholder alignment fix */
html[dir='rtl'] .premium-textarea-md {
    padding-top: 15px !important;
}

html[dir='rtl'] .premium-textarea-md::placeholder {
    padding-top: 2px !important;
}

/* Premium Centered Switch Layouts - Global Standard - RTL Support */
html[dir='rtl'] .premium-switch-centered-wrapper {
    display: flex !important;

    align-items: center !important;
    min-height: 38px !important;
    width: 100% !important;
}

html[dir='rtl'] .premium-switch-centered {
    width: 3rem !important;
    height: 1.65rem !important;
    position: relative !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;

}

/* Ensure the checkbox is hidden */
html[dir='rtl'] .premium-switch-centered .custom-control-input {
    position: absolute !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    z-index: 5 !important;
    margin: 0 !important;
    cursor: pointer !important;
    left: 0 !important;
    top: 0 !important;
}

html[dir='rtl'] .premium-switch-centered .custom-control-label {
    padding: 0 !important;
    margin: 0 !important;
    width: 3rem !important;
    height: 1.65rem !important;
    cursor: pointer !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    transform: none !important;
}

/* Explicitly force track and thumb with content: "" and fixed sizing */
html[dir='rtl'] .premium-switch-centered .custom-control-label::before,
html[dir='rtl'] .premium-switch-centered .custom-control-label::after {
    content: "" !important;
    left: 0 !important;
    right: auto !important;
    top: 50% !important;
    margin: 0 !important;
    transform: translateY(-50%) !important;
    position: absolute !important;
    display: block !important;
}

/* Track styling */
html[dir='rtl'] .premium-switch-centered .custom-control-label::before {
    height: 1.65rem !important;
    width: 3rem !important;
    border-radius: 2rem !important;
    background-color: #e2e8f0 !important;
    border: none !important;
    transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Thumb styling */
html[dir='rtl'] .premium-switch-centered .custom-control-label::after {
    width: calc(1.65rem - 4px) !important;
    height: calc(1.65rem - 4px) !important;
    background-color: #ffffff !important;
    border-radius: 50% !important;
    left: 0.125rem !important;
    transition: background-color 0.15s cubic-bezier(0.68, -0.55, 0.265, 1.55), color 0.15s cubic-bezier(0.68, -0.55, 0.265,
            1.55), border-color 0.15s cubic-bezier(0.68, -0.55, 0.265, 1.55), box-shadow 0.15s cubic-bezier(0.68, -0.55, 0.265,
            1.55), transform 0.15s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.15s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
}

/* Checked states */
html[dir='rtl'] .premium-switch-centered .custom-control-input:checked~.custom-control-label::before {
    background-color: #6366f1 !important;
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.2) !important;
}

html[dir='rtl'] .premium-switch-centered .custom-control-input:checked~.custom-control-label::after {
    transform: translateY(-50%) translateX(1.35rem) !important;
    background-image: var(--icon-tick-indigo) !important;
    background-size: 8px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}


/* ==========================================================================
Modern Select2 & Multi-select Enhancements (Bidirectional Support)
========================================================================== */
html[dir='rtl'] .select2-container--default .select2-selection--multiple {
    border: 1.5px solid #e9ecef !important;
    border-radius: 2px !important;
    padding: 5px 8px !important;
    min-height: 50px !important;
    height: auto !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
    background-color: #fbfbfb !important;
    display: flex !important;
    flex-wrap: wrap !important;
}

html[dir='rtl'] .select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #666ee8 !important;
    background-color: #fff !important;
    box-shadow: 0 4px 8px rgba(102, 110, 232, 0.08) !important;
}

html[dir='rtl'] .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #666ee8 !important;
    border: none !important;
    color: #fff !important;
    border-radius: 2px !important;
    padding: 3px 8px !important;
    margin-top: 6px !important;
    margin-inline-end: 8px !important;
    /* Bidirectional Support */
    font-weight: 500 !important;
    font-size: 13px !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    max-width: calc(100% - 8px) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

html[dir='rtl'] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #fff !important;
    margin-inline-start: 5px !important;
    margin-inline-end: 0 !important;
    float: none !important;
    font-weight: bold !important;
    opacity: 0.8;
    transition: opacity 0.2s;
    order: 2 !important;
}

html[dir='rtl'] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    opacity: 1;
    background: transparent !important;
}

html[dir='rtl'] .premium-label {
    font-weight: 700 !important;
    color: #1e293b !important;
    margin-bottom: 8px !important;
    display: flex !important;
    width: 100% !important;
    align-items: center !important;
    justify-content: space-between !important;
    /* FIXED: Now separates text and icons */
    gap: 10px;
    font-size: 1.0rem !important;
    letter-spacing: 0.3px;
    text-align: right !important;
}

html[dir='rtl'] .premium-label i {
    font-size: 1.25rem;
    /* Reduced by 2px from 1.4rem */
}

html[dir='rtl'] .select2-results__option[aria-selected=true] {
    background-color: #f1f4ff !important;
    color: #666ee8 !important;
    font-weight: 600 !important;
}

html[dir='rtl'] .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #666ee8 !important;
    color: #fff !important;
}

html[dir='rtl'] .bulk-select-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

html[dir='rtl'] .btn-bulk-select {
    font-size: 1.1rem !important;
    padding: 4px 10px !important;
    border-radius: 2px !important;
    font-weight: 600 !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}


/* Final Big & Respected Polishing */
html[dir='rtl'] .badge-light-primary.badge-pill {
    padding: 6px 8px !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

html[dir='rtl'] .custom-control-label {
    font-size: 1.15rem !important;
    font-weight: 510 !important;
    color: #404e67 !important;
    padding-top: 2px !important;
}

html[dir='rtl'] #exportEmployeesForm small.text-muted {
    font-size: 1.1rem !important;
    color: #828690 !important;
    font-weight: 500 !important;
    margin-top: 10px !important;
}

/* Admin Message Center Premium Styles - RTL */
html[dir='rtl'] #admin-messages-module {
    --msg-indigo: #6366f1;
    --msg-blue: #3b82f6;
    --msg-bg-light: #f8fafc;
    --msg-border: rgba(99, 102, 241, 0.1);
    --msg-glass: rgba(255, 255, 255, 0.8);
}

html[dir='rtl'] #admin-messages-module .content-wrapper {
    font-size: 1.15rem !important;
    background-color: transparent !important;
}

html[dir='rtl'] #admin-messages-module .msg-main-card {
    background: var(--msg-glass);
    backdrop-filter: blur(10px);
    border-radius: 2px !important;
    border: 1px solid var(--msg-border) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05) !important;
    overflow: hidden;
    margin-top: 15px;
}

html[dir='rtl'] #admin-messages-module .msg-card-header-premium {
    padding: 1.5rem;
    border-bottom: 1px solid var(--msg-border);
    background: rgba(255, 255, 255, 0.4);
}

html[dir='rtl'] #admin-messages-module .msg-sidebar-card {
    background: var(--msg-glass);
    backdrop-filter: blur(10px);
    border-radius: 2px !important;
    border: 1px solid var(--msg-border) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05) !important;
    overflow: hidden;
}

html[dir='rtl'] #admin-messages-module .msg-sidebar-btn-container {
    padding: 0.75rem 13px !important;
}

html[dir='rtl'] #admin-messages-module .msg-sidebar-btn {
    background: linear-gradient(135deg, #1e9ff2, #111d5e) !important;
    color: #fff !important;
    font-weight: 700 !important;
    border-radius: 2px !important;
    padding: 8px !important;
    box-shadow: 0 4px 15px rgba(30, 159, 242, 0.3) !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

html[dir='rtl'] #admin-messages-module .msg-sidebar-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(30, 159, 242, 0.4) !important;
}

/* Modal Header Alignment */
html[dir='rtl'] #admin-messages-module .modal-header {
    display: flex !important;
    align-items: center !important;

    flex-direction: row !important;
}

html[dir='rtl'] #admin-messages-module .msg-nav-link {
    padding: 8px 8px !important;
    color: #64748b !important;
    font-weight: 600 !important;
    border-radius: 2px !important;
    margin: 4px 8px;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
    font-size: calc(1.15rem - 3px) !important;
}

html[dir='rtl'] #admin-messages-module .msg-nav-link:hover {
    background: rgba(99, 102, 241, 0.05) !important;
    color: var(--msg-indigo) !important;
    transform: translateX(-5px);
}

html[dir='rtl'] #admin-messages-module .msg-nav-link.active {
    background: linear-gradient(to left, rgba(99, 102, 241, 0.1), transparent) !important;
    color: var(--msg-indigo) !important;
    border-right: 4px solid var(--msg-indigo);
}

html[dir='rtl'] #admin-messages-module .msg-count-badge {
    background: #f1f5f9;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
}

html[dir='rtl'] #admin-messages-module .msg-nav-link.active .msg-count-badge {
    background: var(--msg-indigo);
    color: #fff;
}

/* Message List & Table Styles */
html[dir='rtl'] #admin-messages-module .table thead th {
    background: #f8fafc !important;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    font-weight: 700;
    color: #64748b;
    border: none !important;
    padding: 15px 8px;
}

html[dir='rtl'] #admin-messages-module .table tbody tr {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.02) !important;
}

html[dir='rtl'] #admin-messages-module .table tbody tr:hover {
    background-color: rgba(99, 102, 241, 0.02) !important;
    transform: scale(0.998);
}

html[dir='rtl'] #admin-messages-module .msg-star {
    cursor: pointer;
    color: #cbd5e1;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    font-size: 1.1rem;
}

html[dir='rtl'] #admin-messages-module .msg-star.starred {
    color: #f59e0b;
}

html[dir='rtl'] #admin-messages-module .msg-star:hover {
    transform: scale(1.2);
}

html[dir='rtl'] #admin-messages-module .msg-badge-new {
    background: var(--msg-indigo);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

html[dir='rtl'] #admin-messages-module .bg-primary-subtle {
    background-color: rgba(99, 102, 241, 0.05) !important;
}

/* Compose Form Premium Styles */
html[dir='rtl'] #admin-messages-module .compose-modern-form {
    height: 700px;
}

html[dir='rtl'] #admin-messages-module .bg-premium-sidebar {
    background: #fcfdfe !important;
}

html[dir='rtl'] #admin-messages-module .glass-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10;
}

html[dir='rtl'] #admin-messages-module .premium-search-bar {
    border-radius: 6px;
    background: #fff;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

html[dir='rtl'] #admin-messages-module .recipient-card {
    border: 1px solid transparent !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
    margin-bottom: 4px;
}

html[dir='rtl'] #admin-messages-module .recipient-card:hover {
    background: rgba(99, 102, 241, 0.02) !important;
    border-color: rgba(99, 102, 241, 0.1) !important;
}

html[dir='rtl'] #admin-messages-module .recipient-card.card-selected {
    background: rgba(99, 102, 241, 0.05) !important;
    border-color: var(--msg-indigo) !important;
}

html[dir='rtl'] #admin-messages-module .avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--avatar-bg);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

html[dir='rtl'] #admin-messages-module .premium-broadcast-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(59, 130, 246, 0.05));
    border-radius: 6px;
    padding: 15px !important;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

html[dir='rtl'] #admin-messages-module .icon-orb {
    width: 45px;
    height: 45px;
    border-radius: 6px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

html[dir='rtl'] #admin-messages-module .premium-input-wrapper,
html[dir='rtl'] #admin-messages-module .premium-textarea-wrapper {
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

html[dir='rtl'] #admin-messages-module .premium-input-wrapper:focus-within,
html[dir='rtl'] #admin-messages-module .premium-textarea-wrapper:focus-within {
    background: #fff;
    border-color: var(--msg-indigo);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

html[dir='rtl'] #admin-messages-module .btn-premium-send {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff !important;
    border-radius: 6px;
    padding: 8px 40px;
    font-weight: 700;
    box-shadow: 0 10px 8px rgba(99, 102, 241, 0.2);
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

html[dir='rtl'] #admin-messages-module .btn-premium-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.3);
}

html[dir='rtl'] #admin-messages-module [data-textdirection="rtl"] .modal-header .close {
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* ==========================================================================
Syncing Missing Premium Navbar & Avatar Styles from LTR to RTL
========================================================================== */

/* Avatar Utilities */
html[dir='rtl'] .avatar-gray-bg {
    background-color: #f8fafc !important;
}

html[dir='rtl'] .avatar-gradient-bg {
    background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%) !important;
}

html[dir='rtl'] .avatar-img-fit {
    object-fit: cover !important;
    width: 100% !important;
    height: 100% !important;
    transition: transform 0.15s ease;
}

/* Removed redundant .avatar-circle */
html[dir='rtl'] .avatar-size-40 {
    width: 40px !important;
    height: 40px !important;
}

html[dir='rtl'] .avatar-size-50 {
    width: 50px !important;
    height: 50px !important;
}

html[dir='rtl'] .avatar-size-60 {
    width: 60px !important;
    height: 60px !important;
}

html[dir='rtl'] .avatar-size-80 {
    width: 80px !important;
    height: 80px !important;
}

html[dir='rtl'] .avatar-size-100 {
    width: 100px !important;
    height: 100px !important;
}

html[dir='rtl'] .avatar-initials {
    display: inline-flex !important;
    align-items: center !important;

    color: #ffffff !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    background-color: #6366f1 !important;
}



html[dir='rtl'] .dropdown-notification .nav-link-label {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;

    padding: 0.8rem 1rem !important;
    min-width: 44px !important;
}

html[dir='rtl'] .badge-up {
    position: absolute !important;
    top: -4px !important;
    /* Moved up further */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    min-width: 18px !important;
    height: 18px !important;
    padding: 0 4px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    border: 2px solid #fff !important;
    border-radius: 50px !important;
    /* Forces perfect circle for small numbers, pill for large */
    line-height: 1 !important;
    z-index: 10 !important;

    /* RTL Hardcoded Positioning */
    left: 4px !important;
    /* Moved further to the left */
    right: auto !important;
}

/* Specific adjustment for very small screens if needed */
@media (max-width: 576px) {
    .badge-up {
        top: 4px !important;
        right: 2px !important;
    }
}

/* Premium Language Switcher - Glassmorphism Style */
html[dir='rtl'] .language-switcher-premium {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255, 255, 255, 0.82);
    /* Sharper and more visible */
    padding: 4px 14px;
    /* Slightly reduced padding to match system height */
    border-radius: 50px;
    transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0,
            0.2, 1), opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    height: 40px !important;
    /* Standard height for navbar capsules */
    margin: 0 10px;
}

html[dir='rtl'] .language-switcher-premium:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border-color: #fff;
}

html[dir='rtl'] .language-switcher-premium .flag-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 2px solid #fff;
}

html[dir='rtl'] .language-switcher-premium .lang-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #444;
    margin: 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Premium User Pill - Navbar (Refined & Distinct) */
html[dir='rtl'] .premium-user-pill {
    display: flex;
    align-items: center;
    background: transparent;
    /* Transparent background for a cleaner look */
    border: none;
    /* Removed border as requested */
    padding: 2px 10px;
    /* Reduced vertical padding to match other items */
    border-radius: 6px;
    /* Less rounded for more corporate feel */
    transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0,
            0.2, 1), opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    height: 44px !important;
    /* Fixed height to match other navbar items */
}

html[dir='rtl'] .premium-user-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

html[dir='rtl'] .user-info-text {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 15px;
    line-height: 1.1;
}

html[dir='rtl'] .user-info-text .greeting-text {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

html[dir='rtl'] .user-info-text .user-name-text {
    font-size: 0.95rem;
    color: #1e293b;
    font-weight: 800;
    letter-spacing: -0.2px;
}

html[dir='rtl'] .avatar-wrapper-premium {
    width: 38px;
    height: 38px;
    border-radius: 2px;
    /* Slight rounding, not fully circular */
    overflow: hidden;
    position: relative;
    border: 1.5px solid #f1f5f9;
}

html[dir='rtl'] .avatar-img-premium {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

html[dir='rtl'] .avatar-initials-premium {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 800;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

html[dir='rtl'] .chevron-icon {
    font-size: 0.9rem !important;
    color: #94a3b8;
    transition: transform 0.2s ease;
    margin-top: 2px;
}

/* Dark Navbar Support */
html[dir='rtl'] .header-navbar.navbar-semi-dark .premium-user-pill {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

html[dir='rtl'] .header-navbar.navbar-semi-dark .user-name-text {
    color: #f8fafc;
}

html[dir='rtl'] .header-navbar.navbar-semi-dark .greeting-text {
    color: #64748b;
}

html[dir='rtl'] .header-navbar.navbar-semi-dark .avatar-img-premium,
html[dir='rtl'] .header-navbar.navbar-semi-dark .avatar-initials-premium {
    border-color: #334155;
}

/* Dark Navbar adjustments */
html[dir='rtl'] .header-navbar.navbar-semi-dark .language-switcher-premium .lang-name {
    color: #fff;
}

html[dir='rtl'] .header-navbar.navbar-semi-dark .language-switcher-premium {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Dropdown Premium Styling */
[data-textdirection='rtl'] .dropdown-header-premium {
    padding: 20px 15px !important;
    border-radius: 2px !important;
    background: linear-gradient(135deg, #f8faff 0%, #f1f4ff 100%) !important;
    margin-bottom: 2px !important;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

html[dir='rtl'] .dropdown-header-premium .user-name {
    display: block;
    font-weight: 800 !important;
    color: #0f172a !important;
    font-size: 1.15rem !important;
    margin-bottom: 4px;
    letter-spacing: 0;
}

/* RTL Premium Dropdown Fix */
[data-textdirection='rtl'] .premium-dropdown-item {
    padding: 6px 18px !important;
    border-radius: 2px !important;
    display: flex !important;
    align-items: center !important;
    color: #475569 !important;
    font-weight: 600 !important;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1) !important;
    border: none !important;
    background: transparent !important;
}

[data-textdirection='rtl'] .dropdown-icon-wrapper {
    width: 40px !important;
    height: 40px !important;
    border-radius: 12px !important;
    display: grid !important;
    place-items: center !important;
    margin-left: 25px !important;
    margin-right: 0 !important;
    direction: ltr !important;
    /* Essential to prevent icon shifting in RTL */
}

[data-textdirection='rtl'] .dropdown-icon-wrapper i {
    display: block !important;
    direction: ltr !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
}

[data-textdirection='rtl'] .premium-dropdown-item:hover {
    background-color: #f8fafc !important;
    color: #0f172a !important;
    padding-right: 20px !important;
}

[data-textdirection='rtl'] .premium-dropdown-item:hover .dropdown-icon-wrapper {
    transform: scale(1.1);
    background-color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

[data-textdirection='rtl'] .premium-dropdown-item.logout-item:hover {
    background-color: #fff1f1 !important;
}

[data-textdirection='rtl'] .premium-dropdown-item.logout-item {
    color: #ef4444 !important;
}

/* Premium Preview List (Notifications & Messages) */
html[dir='rtl'] .navbar-dropdown.preview-list {
    min-width: 350px !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Universal Dropdown Clipping Fix (Anchors perfectly to the icon in Mobile & Tablet) */
@media (max-width: 991.98px) {
    body .header-navbar .navbar-container .nav-item.dropdown .dropdown-menu.navbar-dropdown.preview-list {
        position: absolute !important;
        top: 100% !important;
        left: -15px !important;
        /* RTL: Anchor securely to the left edge near the icon */
        right: auto !important;
        /* Expand safely inwards to the right */
        width: 38px !important;
        max-width: calc(100vw - 30px) !important;
        /* Protects against clipping on tiny screens */
        margin: 10px 0 0 0 !important;
        transform: none !important;
    }
}

html[dir='rtl'] .dropdown-header-main {
    padding: 15px 8px !important;
    display: flex !important;
    align-items: center !important;

    background: #fff !important;
    border-bottom: 1px solid #f1f4f9 !important;
}

html[dir='rtl'] .dropdown-header-main .header-title {
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    color: #1a1f26 !important;
    margin: 0 !important;
}

html[dir='rtl'] .premium-badge-count {
    background: rgba(99, 102, 241, 0.1) !important;
    color: #6366f1 !important;
    padding: 3px 10px !important;
    border-radius: 2px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
}

html[dir='rtl'] .preview-item-premium {
    padding: 15px 8px !important;
    display: flex !important;
    align-items: flex-start !important;
    border-bottom: 1px solid #f1f4f9 !important;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease !important;
    text-decoration: none !important;
    background: #fff !important;
}

html[dir='rtl'] .preview-item-premium:hover {
    background: #f9faff !important;
}

html[dir='rtl'] .preview-thumbnail-premium {
    width: 38px !important;
    height: 38px !important;
    border-radius: 2px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    margin-right: 15px !important;
    flex-shrink: 0 !important;
}

html[dir='rtl'] .preview-item-content-premium {
    flex-grow: 1;
}

html[dir='rtl'] .preview-item-content-premium .subject {
    font-weight: 700;
    color: #1e293b;
    display: block;
    margin-bottom: 3px;
    font-size: 0.9rem;
}

html[dir='rtl'] .preview-item-content-premium .message-text {
    font-size: 0.8rem;
    color: #64748b;
    display: block;
    line-height: 1.4;
    white-space: normal;
}

html[dir='rtl'] .preview-item-content-premium .time {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 5px;
    display: block;
    font-weight: 500;
}

html[dir='rtl'] .dropdown-footer-premium {
    padding: 8px !important;
    text-align: center !important;
    background: #f8fafc !important;
    border-top: 1px solid #f1f5f9 !important;
}

html[dir='rtl'] .dropdown-footer-premium a {
    color: #6366f1 !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    text-decoration: none !important;
}

html[dir='rtl'] .dropdown-footer-premium a:hover {
    color: #4f46e5 !important;
}

html[dir='rtl'] .premium-switch-centered {
    width: 3rem !important;
    height: 1.65rem !important;
    position: relative !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;

}

html[dir='rtl'] .premium-switch-centered .custom-control-input {
    position: absolute !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    z-index: 5 !important;
    margin: 0 !important;
    cursor: pointer !important;
    left: 0 !important;
    top: 0 !important;
}

html[dir='rtl'] .premium-switch-centered .custom-control-label {
    padding: 0 !important;
    margin: 0 !important;
    width: 3rem !important;
    height: 1.65rem !important;
    cursor: pointer !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    transform: none !important;
}

html[dir='rtl'] .premium-switch-centered .custom-control-label::before,
html[dir='rtl'] .premium-switch-centered .custom-control-label::after {
    content: "" !important;
    left: 0 !important;
    right: auto !important;
    top: 50% !important;
    margin: 0 !important;
    transform: translateY(-50%) !important;
    position: absolute !important;
    display: block !important;
}

html[dir='rtl'] .premium-switch-centered .custom-control-label::before {
    height: 1.65rem !important;
    width: 3rem !important;
    border-radius: 2rem !important;
    background-color: #e2e8f0 !important;
    border: none !important;
    transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

html[dir='rtl'] .premium-switch-centered .custom-control-label::after {
    width: calc(1.65rem - 4px) !important;
    height: calc(1.65rem - 4px) !important;
    background-color: #ffffff !important;
    border-radius: 50% !important;
    left: 0.125rem !important;
    transition: background-color 0.15s cubic-bezier(0.68, -0.55, 0.265, 1.55), color 0.15s cubic-bezier(0.68, -0.55, 0.265,
            1.55), border-color 0.15s cubic-bezier(0.68, -0.55, 0.265, 1.55), box-shadow 0.15s cubic-bezier(0.68, -0.55, 0.265,
            1.55), transform 0.15s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.15s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
}

html[dir='rtl'] .premium-switch-centered .custom-control-input:checked~.custom-control-label::before {
    background-color: #6366f1 !important;
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.2) !important;
}

html[dir='rtl'] .premium-switch-centered .custom-control-input:checked~.custom-control-label::after {
    transform: translateY(-50%) translateX(1.35rem) !important;
    background-image: var(--icon-tick-indigo) !important;
    background-size: 8px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}





/* ==========================================================================
PROFESSIONAL RTL MENU ARROW FIX
========================================================================== */
/* Expanded Menu Arrow */
html[dir='rtl'] body.vertical-layout.vertical-menu-modern.menu-expanded .main-menu .navigation li.has-sub>a:not(.mm-next):after {
    content: "\f110" !important;
    /* la-angle-down - Base icon */
    font-family: 'LineAwesome' !important;
    font-size: 1rem !important;
    transform: rotate(90deg) !important;
    /* Points Left in RTL */
    transition: transform 0.15s ease !important;
}


html[dir='rtl'] body.vertical-layout.vertical-menu-modern.menu-expanded .main-menu .navigation li.open>a:not(.mm-next):after {
    transform: rotate(0deg) !important;
    /* Points Down when open */
}

/* Collapsed Menu (Expanded on Hover) Arrow */
html[dir='rtl'] body.vertical-layout.vertical-menu-modern.menu-collapsed .main-menu.expanded .navigation li.has-sub>a:not(.mm-next):after {
    content: "\f110" !important;
    font-family: 'LineAwesome' !important;
    transform: rotate(90deg) !important;
    transition: transform 0.15s ease !important;
}

html[dir='rtl'] body.vertical-layout.vertical-menu-modern.menu-collapsed .main-menu.expanded .navigation li.open>a:not(.mm-next):after {
    transform: rotate(0deg) !important;
}

/* Premium Secondary Button */
html[dir='rtl'] .btn-premium-secondary {
    background-color: #f8f9fa !important;
    color: #4b5563 !important;
    border: 1px solid #e5e7eb !important;
    padding: 10px 24px !important;
    border-radius: 2px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;

    transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

html[dir='rtl'] .btn-premium-secondary:hover {
    background-color: #ffffff !important;
    color: #1e293b !important;
    border-color: #5A8DEE !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08) !important;
}

html[dir='rtl'] .btn-premium-secondary i {
    font-size: 1.2rem !important;
    margin-left: 6px !important;
    /* Margin Left for RTL */
}

/* Premium Modal Close Button */
html[dir='rtl'] .premium-modal-close,
[data-textdirection='rtl'] .premium-modal-close {
    position: absolute !important;
    top: 10px !important;
    /* Raised further to 10px as requested */
    left: 1.5rem !important;
    /* Keep aligned with header padding-left */
    right: auto !important;
}

html[dir='rtl'] .premium-modal-close:hover {
    background: #e2e8f0 !important;
    opacity: 1 !important;
    transform: rotate(90deg) !important;
    color: #ff7588 !important;
}

html[dir='rtl'] .premium-modal-close i {
    font-size: 1.1rem !important;
    margin: 0 !important;
}

/* Premium Utility Classes */
html[dir='rtl'] .bg-premium-gradient {
    background: linear-gradient(135deg, #1F3BB3 0%, #4B63D4 100%) !important;
}

html[dir='rtl'] .bg-indigo-alt {
    background-color: #6610f2 !important;
}

html[dir='rtl'] .avatar-circle {
    border-radius: 50%;
}

html[dir='rtl'] .avatar-size-100 {
    width: 100px;
    height: 100px;
}

/* Modal Details Card Styling */
html[dir='rtl'] .modal-details-card {
    background: #fff;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

/* Bulletproof Ghost Element Centering */
html[dir='rtl'] .modal.modal-pop {
    text-align: center !important;
    padding: 0 !important;
}

html[dir='rtl'] .modal.modal-pop:before {
    content: '';
    display: inline-block;
    height: 100%;
    vertical-align: middle;
    margin-right: -4px;
}

html[dir='rtl'] .modal.modal-pop .modal-dialog {
    display: inline-block !important;
    text-align: right !important;
    vertical-align: middle !important;
    margin: 10px auto !important;
    max-width: 1000px !important;
    width: 95% !important;
    float: none !important;
    position: relative;
    top: 0 !important;
    transform: none !important;
}

html[dir='rtl'] .modal-pop .modal-content {
    border-radius: 2px !important;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2) !important;
    border: none !important;
}





html[dir='rtl'] .premium-modal-header {
    height: 100px !important;
    background: #f8fafc !important;
    margin: -1.5rem -1.5rem 0 -1.5rem !important;
    position: relative !important;
    overflow: hidden !important;
    border-radius: 2px 10px 0 0 !important;
    border-top: 6px solid #0a1969 !important;
}

html[dir='rtl'] .premium-modal-header::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -20px;
    width: 150px;
    height: 150px;
    background: rgba(10, 25, 105, 0.12);
    border-radius: 50%;
    z-index: 1;
}

html[dir='rtl'] .premium-modal-header::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -20px;
    width: 120px;
    height: 120px;
    background: rgba(10, 25, 105, 0.08);
    border-radius: 2px;
    transform: rotate(45deg);
    z-index: 1;
}

html[dir='rtl'] .modal-profile-wrapper {
    margin-top: -50px !important;
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

html[dir='rtl'] .modal-profile-wrapper .avatar-circle {
    border: 5px solid #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

html[dir='rtl'] .modal-name-title {
    color: #1F3BB3;
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
}

html[dir='rtl'] .modal-role-badge {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 8px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
}

html[dir='rtl'] .modal-info-list {
    padding: 1.5rem 0.5rem;
}

html[dir='rtl'] .detail-item-modern {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #f1f5f9;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

html[dir='rtl'] .detail-item-modern:hover {
    border-color: #e2e8f0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

html[dir='rtl'] .detail-item-modern .icon-circle {
    width: 45px;
    height: 45px;
    background: #f8fafc;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
    /* RTL margin left */
    color: #1F3BB3;
}

html[dir='rtl'] .detail-item-modern .icon-circle i {
    font-size: 1.25rem;
}

html[dir='rtl'] .detail-info-label {
    display: block;
    font-size: 0.65rem;
    /* Reduced by 2px */
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

html[dir='rtl'] .detail-info-value {
    display: block;
    font-size: 0.85rem;
    /* Reduced by 2px */
    color: #334155;
    font-weight: 600;
}

html[dir='rtl'] [data-textdirection="rtl"] .detail-info-box {
    text-align: right !important;
}



/* ==========================================================================
Premium Permission Cards Design
========================================================================== */
html[dir='rtl'] .permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    padding: 10px 5px;
}

html[dir='rtl'] .permission-card {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

html[dir='rtl'] .permission-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-5px);
    border-color: #1e9ff2;
}

html[dir='rtl'] .permission-card-header {
    padding: 1.25rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

html[dir='rtl'] .permission-card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    color: #1e293b;
    font-size: 1.05rem;
}

html[dir='rtl'] .permission-card-title i {
    font-size: 1.5rem;
    color: #1e9ff2;
    background: rgba(30, 159, 242, 0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
}

html[dir='rtl'] .permission-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    flex-grow: 1;
}

html[dir='rtl'] .permission-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 2px;
    background: #fcfcfc;
    border: 1px solid #f8fafc;
    transition: all 0.2s ease;
}

html[dir='rtl'] .permission-item:hover {
    background: #f8fafc;
    border-color: #eef2f7;
}

html[dir='rtl'] .permission-label {
    font-size: 0.95rem;
    color: #334155;
    font-weight: 700;
    margin-bottom: 0 !important;
}

html[dir='rtl'] .permission-desc {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 0;
    line-height: 1.3;
}

html[dir='rtl'] .permission-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Disabled State for Card */
html[dir='rtl'] .permission-card.disabled-card {
    opacity: 0.85;
    background-color: #fafafa;
    border-color: #e2e8f0 !important;
    pointer-events: none;
}

html[dir='rtl'] .permission-card.disabled-card .permission-card-header {
    background: #f1f5f9;
}

html[dir='rtl'] .permission-card.disabled-card .permission-card-title i {
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.1);
}

/* Premium Color Selection V2 */
html[dir='rtl'] .color-options-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

html[dir='rtl'] .color-chip {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--chip-color);
    cursor: pointer;
    transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0,
            0.2, 1), opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

html[dir='rtl'] .color-chip:hover {
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

html[dir='rtl'] .color-chip.active {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px #6366f1;
}

html[dir='rtl'] .color-chip.active::after {
    content: '\f17b';
    /* la-check */
    font-family: 'LineAwesome';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 14px;
    font-weight: 900;
}

html[dir='rtl'] .advanced-picker-trigger {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
    color: #64748b;
}

html[dir='rtl'] .advanced-picker-trigger:hover {
    background: #e2e8f0;
    color: #6366f1;
    border-color: #6366f1;
}

html[dir='rtl'] .color-preview-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #1e9ff2;
    margin-inline-end: 8px;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

html[dir='rtl'] .premium-hex-display {
    border: none !important;
    background: #f8fafc !important;
    border-radius: 2px !important;
    padding: 4px 8px !important;
    font-family: 'Monaco', 'Consolas', monospace;
    font-weight: 700;
    color: #475569;
    font-size: 0.9rem;
    width: 100px;
}


/* Support for Inputs without Icons */
html[dir='rtl'] .premium-input-wrapper.no-icon .premium-input {
    padding-left: 1.25rem !important;
}

html[dir='rtl'] [data-textdirection='rtl'] .premium-input-wrapper.no-icon .premium-input {
    padding-right: 1.25rem !important;
}


/* Textarea Improvements */
html[dir='rtl'] textarea.premium-input {
    height: auto !important;
    padding-top: 14px !important;
    line-height: 1.6 !important;
    resize: none !important;
}


/* Ultimate Fix for Textarea Height */
html[dir='rtl'] textarea.form-control.premium-input {
    height: auto !important;
    min-height: 18px !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    line-height: 1.6 !important;
    display: block !important;
}

/* ==========================================================================
Dynamic Company Header Branding
========================================================================== */
html[dir='rtl'] .company-header-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 1rem;
}

html[dir='rtl'] .brand-pill {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    padding: 5px 12px;
    border-radius: 8px !important;
    border: 1px solid #eef0f2;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

html[dir='rtl'] .brand-pill:hover {
    background: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    border-color: #5A8DEE;
}

html[dir='rtl'] .brand-avatar {
    width: 32px;
    height: 32px;
    border-radius: 2px !important;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

html[dir='rtl'] .brand-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

html[dir='rtl'] .brand-avatar .initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
}

html[dir='rtl'] .brand-text {
    font-weight: 600;
    color: #475f7b;
    font-size: 0.95rem;
    white-space: nowrap;
}

/* RTL Support for Header Branding */
html[dir='rtl'] [data-textdirection='rtl'] .brand-pill {
    padding: 5px 6px 5px 15px;
}

html[dir='rtl'] [data-textdirection='rtl'] .brand-avatar {
    margin-right: 0;
    margin-left: 10px;
}

html[dir='rtl'] [data-textdirection='rtl'] .company-header-brand {
    padding-left: 0;
    padding-right: 1.5rem;
}

/* ==========================================================================
Role Management & Protected Fields
========================================================================== */
html[dir='rtl'] .select2-container--default.select2-container--disabled .select2-selection--single {
    cursor: not-allowed !important;
}

html[dir='rtl'] .select2-container--default .select2-selection--single .select2-selection__clear,
html[dir='rtl'] .select2-custom-reset {
    display: none !important;
}

/* ==========================================================================
SweetAlert Premium Centering & Styling
========================================================================== */

/* Premium Mandatory Section Styling - RTL */
html[dir='rtl'] .premium-mandatory-section {
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(220, 38, 38, 0.2);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.05);
    background: #fff;
    margin-bottom: 2rem;
}

html[dir='rtl'] .premium-mandatory-header {
    background: #f8fafc;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
    font-size: 1.27rem;
    font-weight: 800;
    color: #1e293b;
}

html[dir='rtl'] .premium-mandatory-header .title-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #1e293b;
    font-weight: 800;
    font-size: 1.27rem;
}

html[dir='rtl'] .premium-mandatory-header i {
    margin-left: 0;
    font-size: 1.45rem;
    color: #475569;
}

html[dir='rtl'] .premium-mandatory-body {
    padding: 25px 20px;
}

/* Icons in mandatory section - RTL Positioning */
html[dir='rtl'] .premium-mandatory-body .premium-input-wrapper i {
    color: #b91c1c !important;
    z-index: 100 !important;
    right: 1.15rem !important;
    /* left: auto !important; */
    top: 50% !important;
    transform: translateY(-50%) !important;
    position: absolute !important;
}

html[dir='rtl'] .premium-mandatory-body .premium-input {
    padding-right: 0.75rem !important;
    padding-left: 0.75rem !important;
}

html[dir='rtl'] .premium-mandatory-body .premium-input:focus {
    border-color: #f87171 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
}

/* ================================================================
Simple Premium Effect â€” Static Select2 (non-AJAX) - RTL
Targets options WITHOUT the company avatar template safely.
Does NOT affect company/property/maintenance AJAX select2.
================================================================ */

/* Base State */
html[dir='rtl'] body .select2-dropdown:not(.premium-ajax-dropdown) .select2-results__option {
    padding: 8px 8px !important;
    font-size: 1.05rem !important;
    color: #475569 !important;
    background-color: #ffffff !important;
    border-bottom: 1px solid #f1f5f9 !important;
    margin: 0 !important;
    text-align: right !important;
}

/* Remove bottom border from last child */
html[dir='rtl'] body .select2-dropdown:not(.premium-ajax-dropdown) .select2-results__option:last-child {
    border-bottom: none !important;
}

/* Hover State (Prevents Jitter and Color Loss) */
html[dir='rtl'] body .select2-dropdown:not(.premium-ajax-dropdown) .select2-results__option--highlighted[aria-selected],
html[dir='rtl'] body .select2-dropdown:not(.premium-ajax-dropdown) .select2-results__option--highlighted {
    padding: 8px 8px !important;
    margin: 0 !important;
    background-color: #f1f5f9 !important;
    color: #1e9ff2 !important;
}

/* Selected State */
html[dir='rtl'] body .select2-dropdown:not(.premium-ajax-dropdown) .select2-results__option[aria-selected="true"] {
    padding: 8px 8px !important;
    margin: 0 !important;
    background-color: #e0f2fe !important;
    color: #0369a1 !important;
    font-weight: 600 !important;
}

/* ================================================================
Premium Balance Card (Payments Module)
================================================================ */
html[dir='rtl'] .premium-balance-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 2px !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05) !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
    text-align: right !important;
}

html[dir='rtl'] .balance-icon-box {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

html[dir='rtl'] .bg-premium-gradient {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
}

html[dir='rtl'] .balance-name-text {
    font-size: 0.95rem !important;
    color: #1e293b !important;
}

html[dir='rtl'] .balance-label-text {
    font-size: 0.75rem !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b !important;
}

html[dir='rtl'] .premium-border-end {
    border-left: 1px solid #f1f5f9 !important;
    border-right: none !important;
}

/* Interactive hover effect */
html[dir='rtl'] .premium-balance-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
    border-color: #cbd5e1 !important;
}

/* ==========================================================================
PLATINUM PERFORMANCE ACCELERATORS (RTL)
========================================================================== */

html[dir='rtl'] .btn,
html[dir='rtl'] .dropdown-menu,
html[dir='rtl'] .modal-dialog,
html[dir='rtl'] .select2-selection,
html[dir='rtl'] .card {
    will-change: transform, opacity;
}

html[dir='rtl'] .select2-results__option,
html[dir='rtl'] .select2-selection__rendered,
html[dir='rtl'] .select2-selection__arrow {
    transition: none !important;
}

html[dir='rtl'] table.table-hover tbody tr {
    transition: background-color 0.1s ease !important;
}

/* ==========================================================================
ðŸš€ PLATINUM SUMMERNOTE OVERRIDES
========================================================================== */
html[dir='rtl'] .note-editor.note-frame {
    border: 1px solid #e2e8f0 !important;
    border-radius: 2px !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    overflow: hidden;
}

html[dir='rtl'] .note-editor .note-toolbar {
    background-color: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 10px 15px !important;
    margin: 0 !important;
}

html[dir='rtl'] .note-editor .note-btn {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 4px !important;
    color: #475569 !important;
    box-shadow: none !important;
    transition: all 0.15s ease-in-out !important;
}

html[dir='rtl'] .note-editor .note-btn:hover,
.note-editor .note-btn.active {
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #3b82f6 !important;
}

html[dir='rtl'] .note-editor .note-editable {
    padding: 8px !important;
    color: #334155 !important;
    background-color: #ffffff !important;
}

html[dir='rtl'] .note-editor.note-frame .note-statusbar {
    background-color: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
}

/* Premium Stat Icon Floating Shift - Centered Fix */
html[dir='rtl'] .stat-icon-wrapper {
    transform: translateY(0) !important;
    transition: transform 0.3s ease !important;
    display: flex !important;
    align-items: center !important;

}

/* Premium Textarea Height Standardization */
html[dir='rtl'] textarea.premium-input {
    height: auto !important;
    min-height: 45px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

/* Global Fully Paid Message Styled (Matching System Image) */
html[dir='rtl'] .fully-paid-card {
    background: #ffffff !important;
    border-radius: 2px !important;
    border: 1px solid #f1f5f9 !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04) !important;
    padding: 40px 8px !important;
    text-align: center !important;
    margin-bottom: 2rem !important;
}

html[dir='rtl'] .fully-paid-icon-wrapper {
    width: 80px;
    height: 80px;
    background-color: #28d094;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 35px;
    box-shadow: 0 10px 8px rgba(40, 208, 148, 0.2);
}

html[dir='rtl'] .fully-paid-title {
    color: #28d094 !important;
    font-weight: 800 !important;
    font-size: 1.6rem !important;
    margin-bottom: 10px !important;
}

html[dir='rtl'] .fully-paid-subtitle {
    color: #b0b0b0 !important;
    font-size: 1.1rem !important;
    margin-bottom: 0 !important;
}

/* ========================================================================
GLOBAL PREMIUM BUTTONS (PILL DESIGN) - FINAL OVERRIDE (RTL)
======================================================================== */
html[dir='rtl'] .btn-premium-white,
html[dir='rtl'] .btn-premium-back,
html[dir='rtl'] .btn-premium-add,
html[dir='rtl'] .btn-premium-save,
html[dir='rtl'] .btn.btn-premium-add,
html[dir='rtl'] .btn.btn-premium-save,
html[dir='rtl'] button.btn-premium-add,
html[dir='rtl'] button.btn-premium-save,
html[dir='rtl'] a.btn-premium-back {
    background: #ffffff !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
    padding: 10px 22px !important;
    border-radius: 2px !important;
    font-weight: 800 !important;
    font-size: 0.95rem !important;
    /* Reduced by 2px from 1.08rem */
    display: inline-flex !important;
    align-items: center !important;

    gap: 10px !important;
    /* Reduced gap slightly */
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03) !important;
    text-decoration: none !important;
    cursor: pointer !important;
    height: auto !important;
    line-height: normal !important;
}

html[dir='rtl'] .btn-premium-white:hover,
html[dir='rtl'] .btn-premium-back:hover,
html[dir='rtl'] .btn-premium-add:hover,
html[dir='rtl'] .btn-premium-save:hover,
html[dir='rtl'] .btn.btn-premium-add:hover,
html[dir='rtl'] .btn.btn-premium-save:hover,
html[dir='rtl'] button.btn-premium-add:hover,
html[dir='rtl'] button.btn-premium-save:hover,
html[dir='rtl'] a.btn-premium-back:hover {
    background: #f0f9ff !important;
    color: #3b82f6 !important;
    border-color: #3b82f6 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 8px rgba(59, 130, 246, 0.12) !important;
}

html[dir='rtl'] .btn-premium-add i,
html[dir='rtl'] .btn-premium-save i,
html[dir='rtl'] .btn-premium-back i {
    margin: 0 !important;
    font-size: 1.1rem !important;
}


/* Specific Fix for Company Modal RTL */
html[dir='rtl'] #editCompanyModalLabel,
[data-textdirection='rtl'] #editCompanyModalLabel {
    width: 100% !important;
    text-align: right !important;
    justify-content: flex-start !important;
    padding-right: 0 !important;
    font-size: 1.125rem !important;
    /* Reduced by 2px from 1.25rem */
}

html[dir='rtl'] #editCompanyModalLabel i,
[data-textdirection='rtl'] #editCompanyModalLabel i {
    margin-right: 0 !important;
    margin-left: 10px !important;
}

/* FINAL OVERRIDE FOR ALL PLACEHOLDERS - PIXEL PERFECT HARMONY */
::placeholder,
.premium-input::placeholder,
.form-control::placeholder,
[dir='rtl'] .premium-input::placeholder,
[dir='rtl'] .form-control::placeholder {
    font-size: 0.9rem !important;
    opacity: 0.85 !important;
    color: #94a3b8 !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
}

/* Webkit/Blink */
::-webkit-input-placeholder {
    font-size: 0.9rem !important;
    opacity: 0.85 !important;
    color: #94a3b8 !important;
    font-weight: 500 !important;
}

/* Firefox */
::-moz-placeholder {
    font-size: 0.9rem !important;
    opacity: 0.85 !important;
    color: #94a3b8 !important;
    font-weight: 500 !important;
}

/* Select2 Text Alignment Fix - Global LTR/RTL Harmony */
/* Force LTR Defaults */
.select2-container,
.select2-dropdown,
.select2-results__option,
.select2-results__option *,
.select2-selection__rendered {
    text-align: left !important;
    direction: ltr !important;
}


/* Action Buttons Refinements - Font Size & RTL Arrow Fix */
html[dir='rtl'] .btn-premium-white,
html[dir='rtl'] .btn-premium-back,
html[dir='rtl'] .btn-premium-add,
html[dir='rtl'] .btn-premium-save,
[data-textdirection='rtl'] .btn-premium-white,
[data-textdirection='rtl'] .btn-premium-back,
[data-textdirection='rtl'] .btn-premium-add,
[data-textdirection='rtl'] .btn-premium-save {
    font-size: 0.9rem !important;
    /* Reduced from 0.95rem */
}

html[dir='rtl'] .btn-premium-back i.fa-arrow-left,
[data-textdirection='rtl'] .btn-premium-back i.fa-arrow-left {
    transform: scaleX(-1) !important;
    /* Point arrow to the right in RTL */
}

/* ==========================================================================
   PREMIUM FILE UPLOAD SYSTEM (Custom UI) - FINAL STABLE VERSION
   ========================================================================== */
.premium-file-upload-wrapper {
    position: relative;
    margin-top: 5px;
    flex: 1;
    width: 100%;
}

.premium-file-label {
    cursor: pointer;
    display: block;
}

.premium-file-box {
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    transition: all 0.3s ease !important;
    min-height: 42px !important;
}

.premium-file-upload-wrapper:hover .premium-file-box {
    border-color: #6366f1 !important;
    background: #f8faff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08) !important;
}

.file-icon-box {
    width: 28px;
    height: 28px;
    background: #f1f5f9;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 1rem;
}

html[dir="rtl"] .file-icon-box,
[data-textdirection="rtl"] .file-icon-box {
    margin-right: 0 !important;
    margin-left: 10px !important;
}

.file-name {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.browse-badge {
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.browse-badge-primary {
    background: #e0e7ff !important;
    color: #4338ca !important;
}

.browse-badge-danger {
    background: #fee2e2 !important;
    color: #b91c1c !important;
}

.browse-badge-info {
    background: #e0f2fe !important;
    color: #0369a1 !important;
}

/* Label Refinement - Unified for RTL/LTR - HARD FORCED SINGLE LINE */
.premium-label.d-flex {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    /* Ensure no constraints */
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 8px !important;
    padding: 0 12px !important;
}

.premium-form-group {
    width: 100% !important;
    /* Ensure the container is full width */
}

/* THE ULTIMATE FLOAT FIX FOR RTL SEPARATION */
html[dir="rtl"] .premium-label.d-flex {
    display: block !important;
    width: 100% !important;
    clear: both !important;
    overflow: hidden !important;
    /* Clearfix */
}

html[dir="rtl"] .premium-label.d-flex span {
    float: right !important;
    display: inline-block !important;
    width: auto !important;
}

html[dir="rtl"] .premium-label.d-flex .file-action-buttons {
    float: left !important;
    display: flex !important;
    width: auto !important;
    margin-top: 4px !important;
    /* Fine-tune vertical alignment */
}

/* Final Hard Fix - Force push icons to opposite ends */
.premium-label.d-flex span {
    display: inline-block !important;
    white-space: nowrap !important;
    margin: 0 !important;
    flex-shrink: 1 !important;
}

.premium-label.d-flex .file-action-buttons {
    display: inline-flex !important;
    width: auto !important;
    flex-shrink: 0 !important;
    justify-content: flex-end !important;
}

html[dir="rtl"] .premium-label.d-flex,
[data-textdirection="rtl"] .premium-label.d-flex {
    flex-direction: row !important;
}

/* File Action Buttons (View/Delete) - Unified & RTL Optimized */
.file-action-buttons {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
    width: auto !important;
    /* Ensure it only takes needed space */
}

/* Push icons to the absolute end of the row (Left in RTL, Right in LTR) */
.premium-label.d-flex .file-action-buttons {
    margin-inline-start: auto !important;
    /* Standard modern way to push to end */
}

.btn-file-action {
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.55rem !important;
    /* Shrunk from 0.7rem to make the icon itself smaller (approx 3px) */
    border: none !important;
    transition: all 0.02s linear !important;
    cursor: pointer !important;
    padding: 0 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08) !important;
}



.btn-file-action i {
    margin: 0 !important;
    line-height: 1 !important;
    transform: scale(0.85);
    /* Extra refinement to ensure they look smaller and sharp */
}

/* Red Circle with White X (Match Sketch) */
.btn-delete-file {
    background: #ef4444 !important;
    color: #ffffff !important;
}

.btn-delete-file:hover {
    background: #dc2626 !important;
    color: #fff !important;
    transform: scale(1.1) !important;
}

/* Green Circle with White Eye */
.btn-view-file {
    background: #10b981 !important;
    color: #ffffff !important;
}

.btn-view-file:hover {
    background: #059669 !important;
    color: #fff !important;
    transform: scale(1.1) !important;
}




/* ==========================================================================
   FORCED ALIGNMENT FIX FOR PROPERTY ATTACHMENTS
   ========================================================================== */
.premium-label.d-flex {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0 12px !important;
}

html[dir="rtl"] .premium-label.d-flex {
    flex-direction: row !important;
}

.premium-label.d-flex span {
    flex: 1 !important;
    text-align: inherit !important;
}

.premium-label.d-flex .file-action-buttons {
    display: flex !important;
    gap: 8px !important;
    margin-inline-start: auto !important;
    width: auto !important;
}


/* Professional Error Glow for Cards */
.premium-card-error-glow {
    border-color: #ef4444 !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3) !important;
    transition: all 0.3s ease-in-out !important;
}

/* Subtle pulse animation for high attention */
.pulse-error {
    animation: error-pulse 2s infinite;
}

@keyframes error-pulse {
    0% {
        box-shadow: 0 0 5px rgba(239, 68, 68, 0.2);
    }

    50% {
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
    }

    100% {
        box-shadow: 0 0 5px rgba(239, 68, 68, 0.2);
    }
}


/* REFINED HIGH-VISIBILITY ERROR GLOW - STEADY VERSION */
.premium-card-error-glow {
    border: 2px solid #ef4444 !important;
    outline: 4px solid rgba(239, 68, 68, 0.25) !important;
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.6) !important;
    transition: all 0.3s ease !important;
}

/* No animation needed for steady glow */
.pulse-error {
    animation: none !important;
}


/* PERFORMANCE OPTIMIZATIONS FOR SMOOTH SCROLLING */
.glass-header,
.glass-footer,
.premium-breadcrumb,
.language-switcher-premium {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(255, 255, 255, 0.95) !important;
    /* Slightly more opaque but much faster */
}

.premium-card {
    will-change: box-shadow;
    /* Optimize GPU rendering */
}

/* Ensure no heavy filters on content-wrapper during scroll */
.content-wrapper {
    backface-visibility: hidden;
    perspective: 1000;
}


/* FINAL FORCED VERTICAL ALIGNMENT FOR LABEL & BUTTONS */
.premium-label.d-flex {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    /* Prevent dropping to new line */
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 24px !important;
    margin-bottom: 8px !important;
}

.premium-label.d-flex span {
    white-space: nowrap !important;
    /* Keep text on one line */
    flex-shrink: 0 !important;
}

.file-action-buttons {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;

    margin-inline-start: auto !important;
    /* Push to far left in RTL */
}

/* --- DEFINITIVE CENTERING FOR ADD GUARANTOR BUTTON --- */
.btn-premium-add-guarantor {
    width: 36px !important;
    height: 36px !important;
    border-radius: 2px !important;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    color: #ffffff !important;
    position: relative !important;
    display: inline-block !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25) !important;
    overflow: hidden !important;
}

.btn-premium-add-guarantor:hover,
.btn-premium-add-guarantor:focus {
    outline: none !important;
    transform: scale(1.1) !important;
    filter: brightness(1.15) !important;
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4) !important;
}

.btn-premium-add-guarantor:active {
    transform: scale(0.95) !important;
}

.btn-premium-add-guarantor i {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    margin: auto !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.1rem !important;
    padding: 0 !important;
    line-height: 1 !important;
    color: #ffffff !important;
}


/* Status Management Switch Centering */
.premium-switch-centered-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 40px !important;
    height: 100% !important;
}

.premium-switch-centered {
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
}

/*=========================================================================================
    ULTIMATE MOBILE HEADER PARITY FIX (ENFORCED RTL & LTR)
==========================================================================================*/

@media (max-width: 767.98px) {

    /* Standardize Header Height & Layout for ALL Directions */
    html[data-textdirection="rtl"] .header-navbar .navbar-header,
    html[data-textdirection="ltr"] .header-navbar .navbar-header {
        width: 100% !important;
        height: 60px !important;
        padding: 0 15px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: #ffffff !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
        z-index: 1100 !important;
    }

    /* Force Logo Centering (Universal) */
    html[data-textdirection="rtl"] .header-navbar .navbar-header .navbar-brand,
    html[data-textdirection="ltr"] .header-navbar .navbar-header .navbar-brand {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin: 0 !important;
        padding: 0 !important;
        width: auto !important;
        z-index: 5 !important;
    }

    /* Standardize Internal Nav Container */
    html[data-textdirection="rtl"] .header-navbar .navbar-header .nav.navbar-nav,
    html[data-textdirection="ltr"] .header-navbar .navbar-header .nav.navbar-nav {
        width: 100% !important;
        display: flex !important;
        height: 100% !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    /* Directional Button Order */
    html[data-textdirection="rtl"] .header-navbar .navbar-header .nav.navbar-nav {
        flex-direction: row-reverse !important;
    }

    html[data-textdirection="ltr"] .header-navbar .navbar-header .nav.navbar-nav {
        flex-direction: row !important;
    }

    /* Centered Dropdown Icons (Universal) */
    .header-navbar .navbar-container .navbar-collapse.show {
        background: #ffffff !important;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
        border-radius: 0 0 15px 15px !important;
        padding: 10px 0 !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        margin: 0 !important;
        z-index: 1050 !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .header-navbar .navbar-container .navbar-collapse .navbar-nav {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 15px !important;
        width: auto !important;
        margin: 0 auto !important;
    }

    /* Instant Toggle Fix (Universal) */
    .navbar-collapse.collapsing {
        transition: none !important;
        height: auto !important;
        display: flex !important;
    }
}

/*===============================================================================================================================================================================*/

/* Global Layout Reset: Remove transitions that cause resizing lag */
.header-navbar,
.header-navbar *,
.main-menu,
.main-menu *,
.content-wrapper,
.app-content {
    transition: none !important;
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -o-transition: none !important;
}

/* Maintain only small micro-interactions */
.btn,
.nav-link,
.dropdown-item {
    transition: background-color 0.15s ease-in-out !important;
}

/* Premium FileInput Enhancements & Smoother Expansion */


.file-preview-frame {
    border: none !important;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.05) !important;
    margin: 8px !important;
    padding: 10px !important;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1) !important;
    background: #fff !important;
    border-radius: 2px !important;
    display: flex !important;
    flex-direction: column !important;
    /* Force actions under image */
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
}

.file-preview-frame:hover {
    transform: translateY(-5px) scale(1.03) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12) !important;
}

.file-preview-image {
    border-radius: 2px !important;
    max-height: 130px !important;
    width: auto !important;
    object-fit: contain !important;
}

/* Premium FileInput Close Button Fix - Bold move to ensure visibility */
.file-input,
.file-preview {
    overflow: visible !important;
    /* Prevent clipping */
}



/* Minimalist FileInput Preview - Removing white frames but KEEPING actions */
.file-preview-frame,
.kv-file-content {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    margin: 0 auto !important;
    padding: 0 !important;
    width: auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.file-preview-image {
    border-radius: 2px !important;
    max-height: 130px !important;
    width: auto !important;
    object-fit: contain !important;
}

.file-actions {
    margin-top: 12px !important;
    width: 100% !important;
    text-align: center !important;
}

.file-footer-buttons {
    display: flex !important;
    justify-content: center !important;
    gap: 10px !important;
}

.file-footer-caption,
.file-upload-indicator {
    display: none !important;
}

.file-preview-thumbnails {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    padding: 5px 0 2px 0 !important;
    /* Minimized vertical padding */
}

/* Hide FileInput Drag Handle */
.file-drag-handle {
    display: none !important;
}



/* Custom Spacing Utilities */
.mb-4px {
    margin-bottom: 4px !important;
}

.mt-4px {
    margin-top: 4px !important;
}

.mr-4px {
    margin-inline-end: 4px !important;
}

.mr-12px {
    margin-inline-end: 12px !important;
}

.gap-15px {
    gap: 15px !important;
}

textarea.premium-input,
input.premium-input,
select.premium-input {
    border: 1px solid #e2e8f0 !important;
    border-radius: 2px !important;
    display: block !important;
}

/* ==========================================================================
   ROYAL PREMIUM CARDS - UNIFIED DESIGN SYSTEM
   ========================================================================== */
.premium-card {
    background: #ffffff !important;
    border: 1px solid #f1f5f9 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
    margin-bottom: 1.5rem !important;
    overflow: hidden !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    position: relative !important;
    will-change: box-shadow, border-color !important;
}

/* Hover Effect for Animated Cards */
.premium-card-anim {
    cursor: default !important;
}

/* Premium Card Body Refinement */
.premium-card .card-body {
    padding: 1.5rem !important;
}

/* Entry Animation: Slide Up Fade In */
.premium-fade-in {
    animation: premiumSlideUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) both;
}

@keyframes premiumSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* RTL Specific Overrides for Cards */
html[dir='rtl'] .premium-card {
    text-align: right !important;
}

/* Glassmorphism subtle variant for sidebar cards */
.payment-summary-card-premium {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04) !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
}


.premium-warning-badge {
    font-size: 0.875rem !important;
    border: 1px dashed #ffc107 !important;
    border-radius: 6px !important;
}
/* Premium Currency Addon */
.premium-input-group .input-group-text {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef) !important;
    color: #2c3e50 !important;
    font-weight: 700 !important;
    font-size: 0.95rem;
    border: 1px solid #ced4da;
    padding: 0.5rem 1.25rem !important;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

html[data-textdirection='rtl'] .premium-input-group .input-group-text {
    border-right: none !important;
    border-top-left-radius: 0.4rem !important;
    border-bottom-left-radius: 0.4rem !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

html[data-textdirection='ltr'] .premium-input-group .input-group-text {
    border-left: none !important;
    border-top-right-radius: 0.4rem !important;
    border-bottom-right-radius: 0.4rem !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.premium-input-group:focus-within .input-group-text {
    background: linear-gradient(145deg, #e9ecef, #dee2e6) !important;
    color: #1a252f !important;
    border-color: #b1bcc4;
}

/* Disabled/Readonly State */
.premium-input-group input:disabled ~ .input-group-append .input-group-text,
.premium-input-group input[readonly] ~ .input-group-append .input-group-text {
    background: #e9ecef !important;
    color: #a0aec0 !important;
    border-color: #e2e8f0;
    box-shadow: none;
    opacity: 0.7;
}

/* Ultimate Override for Alignment */
html body .app-content .maintenance-item-row .premium-file-upload-wrapper { margin-top: 2px !important; }
html[dir="rtl"] body .app-content .maintenance-item-row .file-preview-container, html[dir="rtl"] body .app-content .maintenance-item-row > .col-md-5 > .premium-form-group > .d-flex > .btn-premium-action { margin-right: 5px !important; margin-top: 2px !important; }
html[dir="ltr"] body .app-content .maintenance-item-row .file-preview-container, html[dir="ltr"] body .app-content .maintenance-item-row > .col-md-5 > .premium-form-group > .d-flex > .btn-premium-action { margin-left: 5px !important; margin-top: 2px !important; }
html body .app-content .maintenance-item-row .premium-file-box { height: 42px !important; min-height: 42px !important; padding: 0 10px !important; }
html body .app-content .maintenance-item-row .premium-file-box .file-icon-box { width: 24px !important; height: 24px !important; font-size: 0.9rem !important; }
html body .app-content .maintenance-item-row .btn-premium-action { width: 42px !important; height: 42px !important; margin: 0 !important; transform: none !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; }
html body .app-content .maintenance-item-row .action-btn-wrapper { min-height: 42px !important; height: 42px !important; margin-top: 0 !important; display: flex !important; align-items: center !important; }
html body .app-content .maintenance-item-row .file-preview-container { height: 42px !important; display: flex !important; align-items: center !important; }
html body .app-content .maintenance-item-row .d-flex.align-items-center.w-100 { height: 42px !important; }
html body .app-content .maintenance-item-row .premium-form-group > label.premium-label { margin-bottom: 8px !important; height: 21px !important; display: block !important; }

/* Global fix for has-icon-left with premium-input */
html[dir='rtl'] .has-icon-left .form-control.premium-input,
html[data-textdirection='rtl'] .has-icon-left .form-control.premium-input {
    padding-right: 1.25rem !important;
    padding-left: 2.75rem !important;
}

html[dir='ltr'] .has-icon-left .form-control.premium-input,
html[data-textdirection='ltr'] .has-icon-left .form-control.premium-input {
    padding-left: 2.75rem !important;
    padding-right: 1.25rem !important;
}

/* Center icons vertically in form controls */
.premium-icon-centered {
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    left: 0 !important;
    width: 2.75rem !important;
    pointer-events: none !important;
    z-index: 4 !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}
.premium-icon-centered i {
    line-height: 1 !important;
    margin: 0 !important;
    display: inline-block !important;
}

html[dir='rtl'] .premium-icon-centered,
html[data-textdirection='rtl'] .premium-icon-centered {
    left: 0;
    right: auto;
}
