/* Official light navigation: neutral canvas with restrained brand accents. */
.sidebar,
html[data-theme='dark'] .sidebar {
    background: var(--surface);
    color: var(--text);
    border-inline-start: 1px solid var(--line);
    box-shadow: none;
}

.sidebar .brand {
    border-bottom-color: var(--line);
}

.sidebar .brand strong,
.sidebar .profile-area strong {
    color: var(--text);
}

.sidebar .brand span,
.sidebar .profile-area span,
.sidebar .nav-section-chevron {
    color: var(--muted);
}

.sidebar #mainNav > .nav-item,
.sidebar #mainNav > .nav-section > .nav-item {
    color: var(--text);
}

.sidebar #mainNav > .nav-item > i:first-child,
.sidebar #mainNav > .nav-section > .nav-item > i:first-child {
    background: var(--surface-soft);
    color: var(--primary);
}

.sidebar #mainNav > .nav-item:hover,
.sidebar #mainNav > .nav-section > .nav-item:hover {
    background: var(--surface-soft);
    color: var(--primary);
}

.sidebar #mainNav > .nav-item.active,
.sidebar #mainNav > .nav-section > .nav-item.active,
.sidebar #mainNav > .nav-section.section-active > .nav-item {
    background: var(--surface-soft);
    color: var(--primary);
    border-color: var(--line);
    box-shadow: inset -3px 0 var(--brand-gold);
}

.sidebar #mainNav > .nav-item.active > i:first-child,
.sidebar #mainNav > .nav-section > .nav-item.active > i:first-child,
.sidebar #mainNav > .nav-section.section-active > .nav-item > i:first-child {
    background: var(--surface-soft);
    color: var(--primary);
}

.sidebar .evaluation-subnav::before {
    background: var(--surface-soft);
}

.sidebar .evaluation-subnav a {
    color: var(--muted);
}

.sidebar .evaluation-subnav a::before {
    background: var(--surface-soft);
}

.sidebar .evaluation-subnav a > i {
    color: var(--primary);
}

.sidebar .evaluation-subnav a:hover {
    background: var(--surface-soft);
    color: var(--primary);
}

.sidebar .evaluation-subnav a.active {
    background: var(--surface-soft);
    color: var(--primary);
}

.sidebar .evaluation-subnav a.active::before {
    background: var(--surface-soft);
    box-shadow: none;
}

.sidebar .evaluation-subnav a.active > i {
    color: var(--primary);
}

.sidebar .users-nav-section,
.sidebar .settings-nav-section,
.sidebar .profile-area {
    border-color: var(--line);
}

.sidebar .sidebar__profile:hover,
.sidebar .sidebar__profile[aria-expanded='true'] {
    background: var(--surface-soft);
}

.sidebar #mainNav::-webkit-scrollbar-thumb {
    background: var(--surface);
}

.app-shell[dir='ltr'] .sidebar #mainNav > .nav-item.active,
.app-shell[dir='ltr'] .sidebar #mainNav > .nav-section > .nav-item.active,
.app-shell[dir='ltr'] .sidebar #mainNav > .nav-section.section-active > .nav-item {
    box-shadow: inset 3px 0 var(--brand-gold);
}

/* Enterprise navigation: calm hierarchy, one active destination, compact density. */
.sidebar {
    padding: 20px 14px 14px;
    background: var(--surface);
}

.sidebar .brand {
    min-height: 66px;
    padding: 0 8px 18px;
    gap: 10px;
}

.sidebar .brand__company-icon {
    overflow: hidden;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.sidebar .brand__company-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transform: none;
}

.sidebar .brand__company-icon [hidden] {
    display: none;
}

.sidebar #mainNav {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 14px;
    padding: 0 2px 18px;
}

.sidebar #mainNav > .nav-item,
.sidebar #mainNav > .nav-section > .nav-item {
    min-height: 46px;
    padding: 7px 9px;
    gap: 9px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--text);
    font-size: 12px;
    font-weight: 650;
    box-shadow: none;
    transition:
        background 0.16s ease,
        color 0.16s ease,
        border-color 0.16s ease;
}

.sidebar #mainNav > .nav-item > i:first-child,
.sidebar #mainNav > .nav-section > .nav-item > i:first-child {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    flex: 0 0 30px;
    border-radius: 9px;
    background: var(--surface-soft);
    color: var(--primary);
    font-size: 15px;
}

.sidebar #mainNav > .nav-item:hover,
.sidebar #mainNav > .nav-section > .nav-item:hover {
    background: var(--surface-soft);
    color: var(--primary);
}

.sidebar #mainNav > .nav-item.active,
.sidebar #mainNav > .nav-section > .nav-item.active,
.sidebar #mainNav > .nav-section.section-active > .nav-item {
    background: var(--surface-soft);
    color: var(--primary);
    border-color: var(--line);
    box-shadow: inset -3px 0 var(--brand-gold);
}

.sidebar #mainNav > .nav-item.active > i:first-child,
.sidebar #mainNav > .nav-section > .nav-item.active > i:first-child,
.sidebar #mainNav > .nav-section.section-active > .nav-item > i:first-child {
    background: var(--surface-soft);
    color: var(--primary);
}

.sidebar .nav-section-chevron {
    margin-inline-start: auto;
    color: var(--muted);
    font-size: 10px;
}

.sidebar .evaluation-subnav {
    position: relative;
    gap: 2px;
    margin: 3px 19px 8px 0;
    padding: 4px 14px 4px 0;
    border: 0;
}

.sidebar .evaluation-subnav::before {
    content: '';
    position: absolute;
    top: 2px;
    bottom: 2px;
    right: 0;
    width: 1px;
    background: var(--surface-soft);
}

.sidebar .evaluation-subnav a {
    position: relative;
    min-height: 34px;
    padding: 6px 9px;
    gap: 8px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 550;
}

.sidebar .evaluation-subnav a::before {
    content: '';
    position: absolute;
    right: -17px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--surface-soft);
}

.sidebar .evaluation-subnav a > i {
    width: 18px;
    color: var(--primary);
    text-align: center;
}

.sidebar .evaluation-subnav a:hover {
    background: var(--surface-soft);
    color: var(--primary);
}

.sidebar .evaluation-subnav a.active {
    background: var(--surface-soft);
    color: var(--primary);
    font-weight: 750;
}

.sidebar .evaluation-subnav a.active::before {
    width: 7px;
    height: 7px;
    right: -18px;
    background: var(--surface-soft);
    box-shadow: none;
}

.sidebar .evaluation-subnav a.active > i {
    color: var(--primary);
}

.sidebar .evaluation-subnav b {
    margin-inline-start: auto;
    min-width: 20px;
    padding: 1px 5px;
    border-radius: 10px;
    background: var(--surface);
    color: var(--muted);
    font-size: 9px;
    text-align: center;
}

.sidebar .users-nav-section,
.sidebar .settings-nav-section {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.sidebar .profile-area {
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.sidebar #mainNav::-webkit-scrollbar {
    width: 4px;
}

.sidebar #mainNav::-webkit-scrollbar-thumb {
    background: var(--surface);
    border-radius: 10px;
}

.app-shell[dir='ltr'] .sidebar #mainNav > .nav-item.active,
.app-shell[dir='ltr'] .sidebar #mainNav > .nav-section > .nav-item.active,
.app-shell[dir='ltr'] .sidebar #mainNav > .nav-section.section-active > .nav-item {
    box-shadow: inset 3px 0 var(--brand-gold);
}

.app-shell[dir='ltr'] .sidebar .evaluation-subnav {
    margin: 3px 0 8px 19px;
    padding: 4px 0 4px 14px;
}

.app-shell[dir='ltr'] .sidebar .evaluation-subnav::before {
    right: auto;
    left: 0;
}

.app-shell[dir='ltr'] .sidebar .evaluation-subnav a::before {
    right: auto;
    left: -17px;
}

.app-shell[dir='ltr'] .sidebar .evaluation-subnav a.active::before {
    right: auto;
    left: -18px;
}

.swal2-container {
    direction: rtl;
    font-family: inherit;
    z-index: 10000 !important;
}

body.swal2-shown .modal-backdrop .searchable-select.open .select-popover {
    display: none !important;
}

html[lang='en'] .swal2-container {
    direction: ltr;
}

.madar-swal {
    background: var(--popover);
    border: 1px solid var(--line);
    border-radius: 18px;
    color: var(--text);
}

html[data-theme='dark'] .swal2-container.swal2-backdrop-show {
    background: #00000099;
}

html[data-theme='dark'] .madar-swal {
    border-color: var(--line);
    color: var(--text);
    background: var(--canvas);
    box-shadow: 0 24px 70px #0009;
}

html[data-theme='dark'] .madar-swal .swal2-title,
html[data-theme='dark'] .madar-swal .swal2-html-container {
    color: var(--text);
}

html[data-theme='dark'] .madar-swal .swal2-icon.swal2-warning {
    border-color: var(--warning);
    color: var(--warning);
}
