/*
   Phase 10 i18n LTR layer.
   This file is intentionally scoped to html[dir="ltr"] so the Arabic RTL UI
   keeps using the existing CSS unchanged.
*/

html[dir="ltr"] {
    direction: ltr;
    --system-font-family: system-ui, "Segoe UI", Tahoma, Arial, sans-serif !important;
}

html[dir="ltr"] body {
    direction: ltr;
    text-align: left;
}

html[dir="ltr"] [dir="rtl"] {
    direction: rtl;
    text-align: right;
}

html[dir="ltr"] :where(input, textarea, select, button, table, th, td, label, a, span, p, div, strong, small, h1, h2, h3, h4, h5, h6) {
    letter-spacing: 0;
}

html[dir="ltr"] :where(input, textarea, select) {
    text-align: left;
}

html[dir="ltr"] :where(.util-display-inline-dir-ltr-00c8, .util-dir-ltr-text-left-15b6, .util-dir-ltr-text-left-51b3, .util-text-prewrap-dir-ltr-text-left-pad-6e28, .util-text-prewrap-dir-ltr-text-left-pad-9146, .util-text-prewrap-dir-ltr-pad-rounded-aa1c, .bulk-id, .audit-hash, .audit-bulk, code, pre, .checksum) {
    direction: ltr;
    text-align: left;
}

html[dir="ltr"] .util-utility-ccc8 {
    direction: ltr !important;
    text-align: left !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .dashboard {
    padding: 0 0 0 var(--erp-shell-sidebar-width) !important;
}

html[dir="ltr"] body.msar-shell.msar-classic.admin-sidebar-collapsed .dashboard {
    padding-right: 0 !important;
    padding-left: var(--erp-shell-sidebar-collapsed) !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .side-info {
    inset-inline-start: 0 !important;
    inset-inline-end: auto !important;
    left: 0 !important;
    right: auto !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .main-form {
    direction: ltr !important;
    text-align: left !important;
}

html[dir="ltr"] body.msar-shell.msar-classic :where(.main-topbar, .msar-breadcrumb-bar, .module-switcher-wrap, .module-switcher, .msar-user-strip, .brand-inline, .action-bar, .actions, .table-actions, .employee-footer-bottom-nav, .bottom-nav, .employee-mobile-nav) {
    direction: ltr !important;
}

html[dir="ltr"] body.msar-shell.msar-classic :where(.section-title, .msar-section-title, .module-page-title, .msar-breadcrumb, .field label, th, td, .cell, .meta-cell, .analytics-label, .analytics-value, .analytics-sub, .task-label, .task-value, .task-sub) {
    text-align: left !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .main-topbar {
    grid-template-columns: 56px minmax(0, 1fr) minmax(210px, 280px) !important;
    grid-template-areas: "title modules user" !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .module-page-title {
    justify-content: flex-start !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .module-page-title .admin-sidebar-toggle {
    margin-inline: 10px 0 !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .msar-user-strip {
    justify-content: flex-end !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .module-switcher-wrap {
    justify-content: flex-start !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .msar-breadcrumb-bar {
    flex-direction: row !important;
    justify-content: space-between !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .msar-breadcrumb {
    order: 1 !important;
    justify-content: flex-start !important;
    direction: ltr !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .msar-date {
    order: 2 !important;
    justify-content: flex-end !important;
    direction: ltr !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .main-form :where(.card, .ui-card, .app-card, .mini-card, .analytics-card, .ui-page-header) {
    direction: ltr !important;
    text-align: left !important;
}

html[dir="ltr"] body.msar-shell.msar-classic :where(.section-title, .msar-section-title) {
    border-right: 0 !important;
    border-left: 4px solid var(--brand-blue, #1988d8) !important;
    padding-right: 0 !important;
    padding-left: 12px !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .main-form :where(.section-title, .msar-section-title, .card > h1:first-child, .card > h2:first-child, .card > h3:first-child, .ui-card > h1:first-child, .ui-card > h2:first-child, .ui-card > h3:first-child) {
    direction: ltr !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    text-align: left !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .main-form :where(.section-title, .msar-section-title, .card > h1:first-child, .card > h2:first-child, .card > h3:first-child, .ui-card > h1:first-child, .ui-card > h2:first-child, .ui-card > h3:first-child)::before {
    right: auto !important;
    left: 0 !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .main-form :where(.section-title, .msar-section-title, .card > h1:first-child, .card > h2:first-child, .card > h3:first-child, .ui-card > h1:first-child, .ui-card > h2:first-child, .ui-card > h3:first-child)::after {
    right: 0 !important;
    left: 42px !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .side-info :where(.sidebar-nav a, .module-sidebar-group-title, .module-sidebar-nav a) {
    direction: ltr;
    text-align: left !important;
    border-right-color: transparent !important;
    border-left-color: transparent !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .side-info :where(.sidebar-nav a.active, .sidebar-nav a:hover, .sidebar-nav a:focus-visible, .module-sidebar-group.is-open > .module-sidebar-group-title, .module-sidebar-nav a.active, .module-sidebar-nav a:hover, .module-sidebar-nav a:focus-visible) {
    border-right-color: transparent !important;
    border-left-color: var(--brand-blue, #1988d8) !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .side-info .sidebar-nav a .nav-icon {
    right: auto !important;
    left: 4px !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .side-info .module-sidebar-nav {
    --sidebar-dot-rail-x: 15px;
    --sidebar-dot-offset-x: -16.5px;
    --sidebar-dot-offset-x-active: -18px;
    --sidebar-icon-right: auto;
    --sidebar-item-padding-right: 0;
}

html[dir="ltr"] body.msar-shell.msar-classic .side-info .module-sidebar-nav::before {
    right: auto !important;
    left: var(--sidebar-dot-rail-x, 15px) !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .side-info .module-sidebar-nav a::before,
html[dir="ltr"] body.msar-shell.msar-classic .side-info .module-sidebar-nav a:has(.nav-icon)::before {
    right: auto !important;
    left: var(--sidebar-dot-offset-x, -16.5px) !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .side-info .module-sidebar-nav a .nav-icon,
html[dir="ltr"] body.msar-shell.msar-classic .side-info .module-sidebar-nav a:hover .nav-icon,
html[dir="ltr"] body.msar-shell.msar-classic .side-info .module-sidebar-nav a:focus-visible .nav-icon,
html[dir="ltr"] body.msar-shell.msar-classic .side-info .module-sidebar-nav a.active .nav-icon {
    right: auto !important;
    left: var(--sidebar-dot-offset-x, -16.5px) !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .side-info .module-sidebar-nav a:hover:has(.nav-icon)::before,
html[dir="ltr"] body.msar-shell.msar-classic .side-info .module-sidebar-nav a:focus-visible:has(.nav-icon)::before,
html[dir="ltr"] body.msar-shell.msar-classic .side-info .module-sidebar-nav a.active:has(.nav-icon)::before,
html[dir="ltr"] body.msar-shell.msar-classic .side-info .module-sidebar-nav a:hover .nav-icon,
html[dir="ltr"] body.msar-shell.msar-classic .side-info .module-sidebar-nav a:focus-visible .nav-icon,
html[dir="ltr"] body.msar-shell.msar-classic .side-info .module-sidebar-nav a.active .nav-icon {
    right: auto !important;
    left: var(--sidebar-dot-offset-x-active, -18px) !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .side-info .module-sidebar-nav a .nav-text,
html[dir="ltr"] body.msar-shell.msar-classic .side-info .sidebar-nav a .nav-text,
html[dir="ltr"] body.msar-shell.msar-classic .side-info .module-sidebar-group-title .msar-section-text {
    text-align: left;
}

html[dir="ltr"] body.msar-shell.msar-classic .module-switcher {
    gap: 8px !important;
    padding-inline: 12px !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .module-tab {
    flex: 0 0 126px !important;
    width: 126px !important;
    min-width: 126px !important;
    padding-inline: 6px !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .module-tab .msar-module-text {
    max-width: 118px !important;
    min-height: 30px !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    text-align: center !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .module-sidebar-group-title {
    grid-template-columns: 34px minmax(0, 1fr) 22px !important;
    gap: 8px !important;
    min-height: 42px !important;
    padding-block: 7px !important;
    padding-inline: 10px 8px !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .module-sidebar-group-title .msar-section-icon {
    grid-column: 1 !important;
    justify-self: center !important;
    margin: 0 !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .module-sidebar-group-title .msar-section-text {
    grid-column: 2 !important;
    justify-self: start !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .module-sidebar-group-title .msar-section-chevron {
    grid-column: 3 !important;
    justify-self: center !important;
    margin: 0 !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .module-sidebar-group-title .msar-section-text {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.28 !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .module-sidebar-group.is-collapsed > .module-sidebar-group-title .msar-section-chevron,
html[dir="ltr"] body.msar-shell.msar-classic .module-sidebar-group.msar-collapsed > .module-sidebar-group-title .msar-section-chevron {
    transform: rotate(-90deg) !important;
}

html[dir="ltr"] body.msar-shell.msar-classic.admin-sidebar-collapsed .side-info {
    overflow: visible !important;
}

html[dir="ltr"] body.msar-shell.msar-classic.admin-sidebar-collapsed .side-info .msar-sidebar-scroll {
    overflow-x: hidden !important;
}

html[dir="ltr"] body.msar-shell.msar-classic.admin-sidebar-collapsed .module-sidebar-group-title {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 54px !important;
    min-width: 54px !important;
    max-width: 54px !important;
    min-height: 42px !important;
    margin-inline: auto !important;
    padding: 0 !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    text-align: center !important;
}

html[dir="ltr"] body.msar-shell.msar-classic.admin-sidebar-collapsed .module-sidebar-group-title .msar-section-icon {
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    margin: 0 !important;
    grid-column: 1 !important;
    color: color-mix(in srgb, var(--brand-cyan, #42d9f4) 76%, var(--white, #fff) 24%) !important;
}

html[dir="ltr"] body.msar-shell.msar-classic.admin-sidebar-collapsed .module-sidebar-group-title .msar-section-icon :where(i, svg, .msar-fa-svg) {
    width: 17px !important;
    min-width: 17px !important;
    height: 17px !important;
    min-height: 17px !important;
    font-size: 17px !important;
    line-height: 1 !important;
}

html[dir="ltr"] body.msar-shell.msar-classic.admin-sidebar-collapsed .module-sidebar-group-title .msar-section-text,
html[dir="ltr"] body.msar-shell.msar-classic.admin-sidebar-collapsed .module-sidebar-group-title .msar-section-chevron,
html[dir="ltr"] body.msar-shell.msar-classic.admin-sidebar-collapsed .side-info .sidebar-nav a .nav-text,
html[dir="ltr"] body.msar-shell.msar-classic.admin-sidebar-collapsed .side-info .module-sidebar-nav,
html[dir="ltr"] body.msar-shell.msar-classic.admin-sidebar-collapsed .side-info .module-sidebar-group > .sidebar-nav {
    display: none !important;
    visibility: hidden !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .msar-sidebar-floating-flyout {
    direction: ltr !important;
    text-align: left !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .msar-sidebar-flyout-list a {
    justify-content: flex-start !important;
    text-align: left !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .msar-user-menu-trigger .notification-badge {
    right: auto !important;
    left: 28px !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .msar-user-menu-panel {
    left: auto !important;
    right: 0 !important;
    direction: ltr !important;
    text-align: left !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .msar-user-menu-panel a {
    direction: ltr !important;
    text-align: left !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .msar-icon-primary {
    margin-left: 0 !important;
    margin-right: 6px !important;
}

html[dir="ltr"] .analytics-card::after {
    right: auto !important;
    left: 0 !important;
    border-radius: 12px 0 0 12px;
}

html[dir="ltr"] :where(.ats-event, .scorecard, .offer-event) {
    border-right: 0 !important;
    border-left: 3px solid var(--brand-blue, #1988d8) !important;
    padding-right: 0 !important;
    padding-left: 12px !important;
}

html[dir="ltr"] :where(.table-wrap, .bulk-table-wrap, .audit-table-wrap) {
    direction: ltr;
}

html[dir="ltr"] body.auth-page :where(.auth-shell, .auth-side-info, .auth-panel, .auth-card, .track-list, .section-head) {
    direction: ltr;
    text-align: left;
}

html[dir="ltr"] body.auth-page .brand-inline {
    justify-content: flex-start;
}

html[dir="ltr"] body.auth-page .track-list {
    padding-left: 18px;
    padding-right: 0;
}

@media (max-width: 980px) {
    html[dir="ltr"] body.msar-shell.msar-classic .dashboard,
    html[dir="ltr"] body.msar-shell.msar-classic.admin-sidebar-collapsed .dashboard {
        padding-right: 0 !important;
        padding-left: var(--erp-shell-sidebar-collapsed) !important;
    }

    html[dir="ltr"] body.msar-shell.msar-classic .side-info,
    html[dir="ltr"] body.msar-shell.msar-classic.admin-sidebar-collapsed .side-info {
        left: 0 !important;
        right: auto !important;
    }
}

@media print {
    html[dir="ltr"] body.msar-shell.msar-classic .dashboard {
        padding: 0 !important;
    }
}

/* Override direction: rtl !important from shell.css for elements not covered by :where() rules */
html[dir="ltr"] body.msar-shell.msar-classic .module-page-title {
    direction: ltr !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .msar-user-strip .msar-user-name {
    direction: ltr !important;
}

/* Admin sidebar mirror in English: keep the bar itself on the left, but mirror
   every control inside it so icons/rails start from the left and chevrons open
   toward the right. These selectors intentionally match the stronger sidebar
   polish rules loaded before this file. */
html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .side-info {
    direction: ltr !important;
    text-align: left !important;
}

html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .side-info > .msar-sidebar-scroll > .brand-inline {
    direction: ltr !important;
    text-align: left !important;
    justify-content: flex-start !important;
}

html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .side-info .brand-title,
html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .side-info .brand-subtitle,
html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .msar-sidebar-module-title,
html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .msar-sidebar-module-desc {
    direction: ltr !important;
    text-align: left !important;
}

html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .module-sidebar-group-title {
    direction: ltr !important;
    grid-template-columns: 30px minmax(0, 1fr) 24px !important;
    padding-inline: 10px 8px !important;
    border-right: 0 !important;
    border-left: 4px solid transparent !important;
}

html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .module-sidebar-group.is-open > .module-sidebar-group-title,
html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .module-sidebar-group.has-active > .module-sidebar-group-title,
html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .module-sidebar-group-title:hover,
html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .module-sidebar-group-title:focus-visible {
    border-right: 0 !important;
    border-left-color: var(--brand-blue, #1988d8) !important;
    padding-right: 8px !important;
    padding-left: 8px !important;
}

html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .module-sidebar-group-title .msar-section-icon {
    grid-column: 1 !important;
    justify-self: center !important;
}

html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .module-sidebar-group-title .msar-section-text {
    grid-column: 2 !important;
    justify-self: stretch !important;
    direction: ltr !important;
    text-align: left !important;
}

html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .module-sidebar-group-title .msar-section-chevron {
    grid-column: 3 !important;
    justify-self: center !important;
}

html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .module-sidebar-group.is-collapsed > .module-sidebar-group-title .msar-section-chevron,
html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .module-sidebar-group.msar-collapsed > .module-sidebar-group-title .msar-section-chevron {
    transform: rotate(-90deg) !important;
}

html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .module-sidebar-group.is-open > .module-sidebar-group-title .msar-section-chevron:not(.no-rotate),
html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .module-sidebar-group:not(.is-collapsed):not(.msar-collapsed) > .module-sidebar-group-title .msar-section-chevron {
    transform: rotate(0deg) !important;
}

html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .side-info .sidebar-nav a,
html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .side-info .module-sidebar-nav a,
html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .side-info .module-sidebar-nav a:hover,
html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .side-info .module-sidebar-nav a:focus-visible,
html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .side-info .module-sidebar-nav a.active {
    direction: ltr !important;
    text-align: left !important;
    padding: 0 8px 0 var(--sidebar-item-padding-left, 32px) !important;
}

html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .side-info .sidebar-nav a .nav-text,
html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .side-info .module-sidebar-nav a .nav-text {
    direction: ltr !important;
    text-align: left !important;
}

html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .side-info .module-sidebar-nav {
    --sidebar-icon-right: auto;
    --sidebar-icon-left: 4px;
    --sidebar-rail-x: 21px;
    --sidebar-item-padding-right: 0;
    --sidebar-item-padding-left: 32px;
    padding: 4px 8px 8px 8px !important;
}

html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .side-info .module-sidebar-nav::before {
    right: auto !important;
    left: var(--sidebar-rail-x, 21px) !important;
}

html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .side-info .module-sidebar-nav::after {
    right: auto !important;
    left: calc(var(--sidebar-rail-x, 21px) - 1px) !important;
}

html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .side-info .module-sidebar-nav a .nav-icon,
html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .side-info .module-sidebar-nav a:hover .nav-icon,
html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .side-info .module-sidebar-nav a:focus-visible .nav-icon,
html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .side-info .module-sidebar-nav a.active .nav-icon,
html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .side-info .sidebar-nav a .nav-icon,
html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .side-info .sidebar-nav a:hover .nav-icon,
html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .side-info .sidebar-nav a:focus-visible .nav-icon,
html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell) .side-info .sidebar-nav a.active .nav-icon {
    right: auto !important;
    left: var(--sidebar-icon-left, 4px) !important;
}

html[dir="ltr"] body.msar-shell.msar-classic:not(.employee-portal-shell).admin-sidebar-collapsed .module-sidebar-group-title {
    border-left: 0 !important;
    padding: 0 !important;
}

/* Employee portal shell: mirror the standalone employee bar and sidebar. */
html[dir="ltr"] body.employee-portal-shell.msar-shell.msar-classic .dashboard,
html[dir="ltr"] body.employee-portal-shell.msar-shell.msar-classic.admin-sidebar-collapsed .dashboard {
    padding-right: 0 !important;
    padding-left: var(--shell-sidebar-open, var(--erp-shell-sidebar-width, 270px)) !important;
}

html[dir="ltr"] body.employee-portal-shell.msar-shell.msar-classic.admin-sidebar-collapsed .dashboard {
    padding-left: var(--shell-sidebar-collapsed, var(--erp-shell-sidebar-collapsed, 88px)) !important;
}

html[dir="ltr"] body.employee-portal-shell.msar-shell.msar-classic .side-info {
    right: auto !important;
    left: 0 !important;
    direction: ltr !important;
    text-align: left !important;
}

html[dir="ltr"] body.employee-portal-shell.msar-shell.msar-classic .main-topbar {
    grid-template-columns: 56px minmax(0, 1fr) minmax(220px, 300px) !important;
    grid-template-areas: "title modules user" !important;
    direction: ltr !important;
}

html[dir="ltr"] body.employee-portal-shell.msar-shell.msar-classic .module-page-title {
    direction: ltr !important;
    justify-content: center !important;
}

html[dir="ltr"] body.employee-portal-shell.msar-shell.msar-classic .module-switcher-wrap,
html[dir="ltr"] body.employee-portal-shell.msar-shell.msar-classic .module-switcher {
    direction: ltr !important;
}

html[dir="ltr"] body.employee-portal-shell.msar-shell.msar-classic .module-switcher {
    justify-content: flex-start !important;
}

html[dir="ltr"] body.employee-portal-shell.msar-shell.msar-classic .msar-user-strip {
    justify-content: flex-end !important;
    direction: ltr !important;
}

html[dir="ltr"] body.employee-portal-shell.msar-shell.msar-classic .msar-user-menu-panel {
    right: 0 !important;
    left: auto !important;
    direction: ltr !important;
    text-align: left !important;
}

html[dir="ltr"] body.employee-portal-shell.msar-shell.msar-classic .msar-sidebar-brand,
html[dir="ltr"] body.employee-portal-shell.msar-shell.msar-classic .side-info > .msar-sidebar-scroll > .brand-inline,
html[dir="ltr"] body.employee-portal-shell.msar-shell.msar-classic .msar-sidebar-profile {
    direction: ltr !important;
    text-align: left !important;
}

html[dir="ltr"] body.employee-portal-shell.msar-shell.msar-classic .side-info .sidebar-nav a {
    direction: ltr !important;
    padding: 0 4px 0 20px !important;
    text-align: left !important;
}

html[dir="ltr"] body.employee-portal-shell.msar-shell.msar-classic .side-info .sidebar-nav a .nav-icon {
    right: auto !important;
    left: 4px !important;
}

html[dir="ltr"] body.employee-portal-shell.msar-shell.msar-classic .side-info .sidebar-nav a .nav-text,
html[dir="ltr"] body.employee-portal-shell.msar-shell.msar-classic .msar-sidebar-profile-name,
html[dir="ltr"] body.employee-portal-shell.msar-shell.msar-classic .msar-sidebar-profile-meta,
html[dir="ltr"] body.employee-portal-shell.msar-shell.msar-classic .msar-sidebar-profile-desc {
    direction: ltr !important;
    text-align: left !important;
}

html[dir="ltr"] body.employee-portal-shell.msar-shell.msar-classic .employee-bottom-nav {
    direction: ltr !important;
}

html[dir="ltr"] body.employee-portal-shell.msar-shell.msar-classic .main-form :where(.field, .field label, .filters, .grid, .grid-fields, .actions, .action-bar) {
    direction: ltr !important;
    text-align: left !important;
}

html[dir="ltr"] body.msar-shell.msar-classic :where(.msar-employee-combo, .msar-warehouse-combo, .msar-combo-floating-list, .msar-employee-combo-list) {
    direction: ltr !important;
    text-align: left !important;
}

html[dir="ltr"] body.msar-shell.msar-classic :where(.msar-employee-combo-input, .msar-employee-combo-option, .msar-employee-combo-empty) {
    direction: ltr !important;
    text-align: left !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .msar-employee-combo-search {
    flex-direction: row !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .msar-employee-combo-icon,
html[dir="ltr"] body.msar-shell.msar-classic .msar-employee-combo-clear {
    border-inline-start: 0 !important;
    border-inline-end: 1px solid var(--brand-border, var(--border-soft, #e5edf7)) !important;
}

/* Standalone employee evaluation page uses the same locale contract as the portal shell. */
html[dir="ltr"] body.employee-evaluation-page,
html[dir="ltr"] body.employee-evaluation-gate,
html[dir="ltr"] body.employee-evaluation-thankyou {
    direction: ltr !important;
    text-align: left !important;
}

html[dir="ltr"] body.employee-evaluation-page .side-info,
html[dir="ltr"] body.employee-evaluation-page .main-form,
html[dir="ltr"] body.employee-evaluation-page .main-topbar,
html[dir="ltr"] body.employee-evaluation-page .brand-inline,
html[dir="ltr"] body.employee-evaluation-page .section-head,
html[dir="ltr"] body.employee-evaluation-thankyou .side-info,
html[dir="ltr"] body.employee-evaluation-thankyou .main-form,
html[dir="ltr"] body.employee-evaluation-thankyou .brand-inline,
html[dir="ltr"] body.employee-evaluation-thankyou .section-head,
html[dir="ltr"] body.employee-evaluation-gate .gate-card,
html[dir="ltr"] body.employee-evaluation-gate .gate-brand,
html[dir="ltr"] body.employee-evaluation-gate .gate-message,
html[dir="ltr"] body.employee-evaluation-gate .gate-title {
    direction: ltr !important;
    text-align: left !important;
}

html[dir="ltr"] body.employee-evaluation-page .brand-title,
html[dir="ltr"] body.employee-evaluation-thankyou .brand-title,
html[dir="ltr"] body.employee-evaluation-gate .gate-brand h1 {
    border-right: 0 !important;
    border-left: 4px solid var(--brand-gold, #C5A059) !important;
    padding-right: 0 !important;
    padding-left: 14px !important;
}

html[dir="ltr"] body.employee-evaluation-page .track-item,
html[dir="ltr"] body.employee-evaluation-thankyou .track-item {
    padding: 0 0 32px 30px !important;
    border-right: 0 !important;
    border-left: 2px solid rgba(255,255,255,0.11) !important;
    text-align: left !important;
}

html[dir="ltr"] body.employee-evaluation-page .track-item.active,
html[dir="ltr"] body.employee-evaluation-thankyou .track-item.active {
    border-left-color: var(--brand-gold, #C5A059) !important;
}

html[dir="ltr"] body.employee-evaluation-page .track-item::after,
html[dir="ltr"] body.employee-evaluation-thankyou .track-item::after {
    right: auto !important;
    left: -7px !important;
}

@media (max-width: 980px) {
    html[dir="ltr"] body.employee-portal-shell.msar-shell.msar-classic .dashboard,
    html[dir="ltr"] body.employee-portal-shell.msar-shell.msar-classic.admin-sidebar-collapsed .dashboard {
        padding-left: var(--shell-sidebar-collapsed, var(--erp-shell-sidebar-collapsed, 88px)) !important;
        padding-right: 0 !important;
    }
}

@media (max-width: 900px) {
    html[dir="ltr"] body.employee-portal-shell.msar-shell.msar-classic .main-form {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    html[dir="ltr"] body.employee-portal-shell.msar-shell.msar-classic .side-info,
    html[dir="ltr"] body.employee-portal-shell.msar-shell.msar-classic.admin-sidebar-collapsed .side-info {
        right: auto !important;
        left: 0 !important;
        transform: translateX(-105%) !important;
    }

    html[dir="ltr"] body.employee-portal-shell.msar-shell.msar-classic:not(.admin-sidebar-collapsed) .side-info {
        right: auto !important;
        left: 0 !important;
        transform: translateX(0) !important;
        box-shadow: 18px 0 34px rgba(10, 25, 47, .24) !important;
    }
}

/* Locale alignment contract: Arabic reads from the right, English from the left.
   Keep icon/action columns and intentionally centered cells out of this rule. */
html[dir="rtl"] body.msar-shell.msar-classic :where(
    .main-form,
    .card,
    .ui-card,
    .app-card,
    .mini-card,
    .adm-form-card,
    .adm-table-card,
    .adm-guide-card,
    .field,
    .field label,
    .section-title,
    .section-subtitle,
    .muted,
    .msar-breadcrumb,
    .module-page-title,
    .module-sidebar-group-title .msar-section-text,
    .module-sidebar-nav a .nav-text,
    .sidebar-nav a .nav-text,
    .msar-sidebar-module-title,
    .msar-sidebar-module-desc,
    .brand-title,
    .brand-subtitle
) {
    text-align: right !important;
}

html[dir="ltr"] body.msar-shell.msar-classic :where(
    .main-form,
    .card,
    .ui-card,
    .app-card,
    .mini-card,
    .adm-form-card,
    .adm-table-card,
    .adm-guide-card,
    .field,
    .field label,
    .section-title,
    .section-subtitle,
    .muted,
    .msar-breadcrumb,
    .module-page-title,
    .module-sidebar-group-title .msar-section-text,
    .module-sidebar-nav a .nav-text,
    .sidebar-nav a .nav-text,
    .msar-sidebar-module-title,
    .msar-sidebar-module-desc,
    .brand-title,
    .brand-subtitle
) {
    text-align: left !important;
}

html[dir="rtl"] body.msar-shell.msar-classic :where(.table-wrap, .msar-data-table-wrap, .auto-table-wrap, .responsive-table-wrap) table :where(th, td):not(.msar-center-cell):not(.actions):not(.actions-cell):not(.action-col):not(.actions-col):not(.msar-actions-cell):not(.msar-table-action-col):not(:has(> .actions)):not(:has(> .table-actions)):not(:has(> .msar-table-actions)):not(:has(> .row-actions)):not(:has(> .btn)):not(:has(> form > .btn)):not(:has(> form > button)) {
    text-align: right !important;
}

html[dir="ltr"] body.msar-shell.msar-classic :where(.table-wrap, .msar-data-table-wrap, .auto-table-wrap, .responsive-table-wrap) table :where(th, td):not(.msar-center-cell):not(.actions):not(.actions-cell):not(.action-col):not(.actions-col):not(.msar-actions-cell):not(.msar-table-action-col):not(:has(> .actions)):not(:has(> .table-actions)):not(:has(> .msar-table-actions)):not(:has(> .row-actions)):not(:has(> .btn)):not(:has(> form > .btn)):not(:has(> form > button)) {
    text-align: left !important;
}

html[dir="rtl"] body.msar-shell.msar-classic .main-form :where(.card-table, .adm-table-card, .table-card) table :where(th, td):not(.msar-center-cell):not(.actions):not(.actions-cell):not(.action-col):not(.actions-col):not(.msar-actions-cell):not(.msar-table-action-col):not(:has(> .actions)):not(:has(> .table-actions)):not(:has(> .msar-table-actions)):not(:has(> .row-actions)):not(:has(> .btn)):not(:has(> form > .btn)):not(:has(> form > button)) {
    text-align: right !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .main-form :where(.card-table, .adm-table-card, .table-card) table :where(th, td):not(.msar-center-cell):not(.actions):not(.actions-cell):not(.action-col):not(.actions-col):not(.msar-actions-cell):not(.msar-table-action-col):not(:has(> .actions)):not(:has(> .table-actions)):not(:has(> .msar-table-actions)):not(:has(> .row-actions)):not(:has(> .btn)):not(:has(> form > .btn)):not(:has(> form > button)) {
    text-align: left !important;
}

html[dir="rtl"] body.msar-shell.msar-classic .main-form :is(form.filters, .filters, form.msar-system-filter, .msar-filter-form, .msar-entry-form, .hr-attendance-filter-form, .hr-attendance-entry-form, .hr-responsibility-form, .workflow-kpi-filter-form) > .field > label,
html[dir="rtl"] body.msar-shell.msar-classic .main-form :is(form.filters, .filters, form.msar-system-filter, .msar-filter-form, .msar-entry-form, .hr-attendance-filter-form, .hr-attendance-entry-form, .hr-responsibility-form, .workflow-kpi-filter-form) > label.field {
    text-align: right !important;
    direction: rtl !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .main-form :is(form.filters, .filters, form.msar-system-filter, .msar-filter-form, .msar-entry-form, .hr-attendance-filter-form, .hr-attendance-entry-form, .hr-responsibility-form, .workflow-kpi-filter-form) > .field > label,
html[dir="ltr"] body.msar-shell.msar-classic .main-form :is(form.filters, .filters, form.msar-system-filter, .msar-filter-form, .msar-entry-form, .hr-attendance-filter-form, .hr-attendance-entry-form, .hr-responsibility-form, .workflow-kpi-filter-form) > label.field {
    text-align: left !important;
    direction: ltr !important;
}

html[dir="rtl"] body.msar-shell.msar-classic .main-form :is(form.filters, .filters, form.msar-system-filter, .msar-filter-form, .msar-entry-form, .hr-attendance-filter-form, .hr-attendance-entry-form, .hr-responsibility-form, .workflow-kpi-filter-form) > .field > :where(.input, .select, .textarea, input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea) {
    text-align: right !important;
    direction: rtl !important;
}

html[dir="ltr"] body.msar-shell.msar-classic .main-form :is(form.filters, .filters, form.msar-system-filter, .msar-filter-form, .msar-entry-form, .hr-attendance-filter-form, .hr-attendance-entry-form, .hr-responsibility-form, .workflow-kpi-filter-form) > .field > :where(.input, .select, .textarea, input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea) {
    text-align: left !important;
    direction: ltr !important;
}
