:root {
    --nx-dark: #1f2937;
    --nx-primary: #0ea5e9;
    --nx-light: #f0f9ff;

    --nx-primary-strong: #0284c7;
    --nx-primary-soft: #e0f2fe;
    --nx-border-soft: #cde9f8;

    --nx-sidebar-bg: #2b3548;
    --nx-sidebar-bg-soft: #253245;
    --nx-sidebar-item: #b8c4d3;
    --nx-sidebar-item-strong: #f3f7fc;
    --nx-sidebar-icon: #7fa0bb;
    --nx-sidebar-header: #7f90a8;
    --nx-sidebar-hover: #33445b;
    --nx-sidebar-open: #1f2b3c;
    --nx-sidebar-line: rgba(255, 255, 255, 0.08);
    --nx-sidebar-accent: #14beff;
    --nx-sidebar-width: 224px;
}

html,
body {
    min-height: 100%;
}

body,
.wrapper {
    min-height: 100dvh;
}

.content-wrapper {
    background: var(--nx-light) !important;
}

.main-sidebar.nx-sidebar,
.main-sidebar.nx-sidebar::before {
    width: var(--nx-sidebar-width);
}

@media (min-width: 768px) {
    body:not(.sidebar-mini-md):not(.sidebar-mini-xs):not(.layout-top-nav) .content-wrapper,
    body:not(.sidebar-mini-md):not(.sidebar-mini-xs):not(.layout-top-nav) .main-footer,
    body:not(.sidebar-mini-md):not(.sidebar-mini-xs):not(.layout-top-nav) .main-header {
        margin-left: var(--nx-sidebar-width);
    }

    .sidebar-collapse body:not(.sidebar-mini-md):not(.sidebar-mini-xs):not(.layout-top-nav) .content-wrapper,
    .sidebar-collapse body:not(.sidebar-mini-md):not(.sidebar-mini-xs):not(.layout-top-nav) .main-footer,
    .sidebar-collapse body:not(.sidebar-mini-md):not(.sidebar-mini-xs):not(.layout-top-nav) .main-header {
        margin-left: 0;
    }
}

@media (max-width: 767.98px) {
    .main-sidebar.nx-sidebar,
    .main-sidebar.nx-sidebar::before {
        margin-left: calc(-1 * var(--nx-sidebar-width));
    }

    .sidebar-open .main-sidebar.nx-sidebar,
    .sidebar-open .main-sidebar.nx-sidebar::before {
        margin-left: 0;
    }
}

.sidebar-collapse:not(.sidebar-mini):not(.sidebar-mini-md):not(.sidebar-mini-xs) .main-sidebar.nx-sidebar,
.sidebar-collapse:not(.sidebar-mini):not(.sidebar-mini-md):not(.sidebar-mini-xs) .main-sidebar.nx-sidebar::before {
    margin-left: calc(-1 * var(--nx-sidebar-width));
}

.main-sidebar.nx-sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden;
    background: linear-gradient(180deg, var(--nx-sidebar-bg) 0%, var(--nx-sidebar-bg-soft) 100%) !important;
    border-right: 1px solid rgba(0, 0, 0, 0.35);
    box-shadow: none !important;
}

.main-sidebar.nx-sidebar::before {
    height: 100% !important;
}

.main-sidebar.nx-sidebar .brand-link {
    display: none !important;
}

.main-sidebar.nx-sidebar .sidebar {
    height: 100% !important;
    max-height: 100%;
    padding-top: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.main-sidebar.nx-sidebar .sidebar > nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.main-sidebar.nx-sidebar .sidebar > nav::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.nx-sidebar .sidebar .form-inline {
    display: none !important;
}

.nx-sidebar .nx-sidebar-brand {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 84px;
    padding: 0 1.35rem;
    border-bottom: 1px solid var(--nx-sidebar-line);
    text-decoration: none;
}

.nx-sidebar .nx-sidebar-brand::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4.75rem;
    height: 3px;
    border-radius: 0 0 3px 0;
    background: var(--nx-sidebar-accent);
}

.nx-sidebar .nx-sidebar-brand__full {
    display: block;
    width: 100%;
    max-width: 150px;
    height: auto;
    object-fit: contain;
}

.nx-sidebar .nx-sidebar-brand__icon {
    display: none;
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.nx-sidebar .nav-sidebar {
    margin-top: 0.45rem;
    padding-bottom: 1rem;
}

.nx-sidebar .nav-sidebar > .nav-item > .nav-link {
    position: relative;
    display: grid;
    grid-template-columns: 1rem 1fr;
    align-items: center;
    column-gap: 0.7rem;
    min-height: 2.55rem;
    margin: 0;
    padding: 0.63rem 1.35rem;
    border-radius: 0;
    color: var(--nx-sidebar-item) !important;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.nx-sidebar .nav-sidebar > .nav-item > .nav-link .nav-icon {
    width: 1rem;
    margin: 0 !important;
    color: var(--nx-sidebar-icon) !important;
    font-size: 0.88rem;
    text-align: center;
}

.nx-sidebar .nav-sidebar > .nav-item > .nav-link p {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    width: 100%;
}

.nx-sidebar .nav-sidebar > .nav-item > .nav-link > p > .right {
    position: static;
    margin-left: 0.7rem;
    font-size: 0.7rem;
    color: #90a5bb;
}

.nx-sidebar .nav-sidebar > .nav-item > .nav-link > p > .badge.right {
    margin-left: 0.45rem;
    padding: 0.14rem 0.36rem;
    border-radius: 999px;
    font-size: 0.62rem;
    line-height: 1;
    white-space: nowrap;
    flex-shrink: 0;
}

.nx-sidebar .nav-sidebar > .nav-item > .nav-link:hover {
    background: var(--nx-sidebar-hover) !important;
    color: var(--nx-sidebar-item-strong) !important;
}

.nx-sidebar .nav-sidebar > .nav-item > .nav-link:hover .nav-icon,
.nx-sidebar .nav-sidebar > .nav-item > .nav-link:hover > p > .right {
    color: #cfe0f2 !important;
}

.nx-sidebar .nav-sidebar > .nav-item > .nav-link.active {
    background: var(--nx-sidebar-open) !important;
    color: #ffffff !important;
}

.nx-sidebar .nav-sidebar > .nav-item > .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.44rem;
    bottom: 0.44rem;
    width: 3px;
    border-radius: 0 2px 2px 0;
    background: var(--nx-sidebar-accent);
}

.nx-sidebar .nav-sidebar > .nav-item > .nav-link.active .nav-icon,
.nx-sidebar .nav-sidebar > .nav-item > .nav-link.active > p > .right {
    color: #ffffff !important;
}

.nx-sidebar .nav-header {
    margin: 1.1rem 0 0.4rem;
    padding: 0 1.35rem;
    border-top: 0;
    color: var(--nx-sidebar-header) !important;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.nx-sidebar .nav-sidebar > .nav-header:first-of-type {
    margin-top: 0.25rem;
}

.nx-sidebar .nav-item.has-treeview.menu-open {
    background: rgba(17, 25, 38, 0.35);
}

.nx-sidebar .nav-item.menu-open > .nav-link {
    background: var(--nx-sidebar-open) !important;
    color: #ffffff !important;
}

.nx-sidebar .nav-item.menu-open > .nav-link .nav-icon,
.nx-sidebar .nav-item.menu-open > .nav-link > p > .right {
    color: #ffffff !important;
}

.nx-sidebar .nav-treeview {
    padding: 0.2rem 0 0.45rem;
}

.nx-sidebar .nav-treeview > .nav-item > .nav-link {
    min-height: 2.2rem;
    padding: 0.45rem 1.35rem 0.45rem 2.75rem;
    font-size: 0.88rem;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: #c2cedd !important;
}

.nx-sidebar .nav-treeview > .nav-item > .nav-link .nav-icon {
    display: none;
}

.nx-sidebar .nav-treeview > .nav-item > .nav-link.active {
    background: transparent !important;
    color: #ffffff !important;
}

.nx-sidebar .nav-treeview > .nav-item > .nav-link:hover {
    background: transparent !important;
    color: #eef4fb !important;
}

.nx-sidebar .nx-sidebar-mobile-close {
    display: none;
}

.sidebar-collapse.sidebar-mini .main-sidebar.nx-sidebar:not(.sidebar-focused):not(:hover) .nx-sidebar-brand,
.sidebar-collapse.sidebar-mini-md .main-sidebar.nx-sidebar:not(.sidebar-focused):not(:hover) .nx-sidebar-brand,
.sidebar-collapse.sidebar-mini-xs .main-sidebar.nx-sidebar:not(.sidebar-focused):not(:hover) .nx-sidebar-brand {
    min-height: 4rem;
    padding: 0;
    justify-content: center;
    border-bottom: 0;
}

.sidebar-collapse.sidebar-mini .main-sidebar.nx-sidebar:not(.sidebar-focused):not(:hover) .nx-sidebar-brand::before,
.sidebar-collapse.sidebar-mini-md .main-sidebar.nx-sidebar:not(.sidebar-focused):not(:hover) .nx-sidebar-brand::before,
.sidebar-collapse.sidebar-mini-xs .main-sidebar.nx-sidebar:not(.sidebar-focused):not(:hover) .nx-sidebar-brand::before {
    width: 100%;
    height: 2px;
}

.sidebar-collapse.sidebar-mini .main-sidebar.nx-sidebar:not(.sidebar-focused):not(:hover) .nx-sidebar-brand__full,
.sidebar-collapse.sidebar-mini-md .main-sidebar.nx-sidebar:not(.sidebar-focused):not(:hover) .nx-sidebar-brand__full,
.sidebar-collapse.sidebar-mini-xs .main-sidebar.nx-sidebar:not(.sidebar-focused):not(:hover) .nx-sidebar-brand__full {
    display: none;
}

.sidebar-collapse.sidebar-mini .main-sidebar.nx-sidebar:not(.sidebar-focused):not(:hover) .nx-sidebar-brand__icon,
.sidebar-collapse.sidebar-mini-md .main-sidebar.nx-sidebar:not(.sidebar-focused):not(:hover) .nx-sidebar-brand__icon,
.sidebar-collapse.sidebar-mini-xs .main-sidebar.nx-sidebar:not(.sidebar-focused):not(:hover) .nx-sidebar-brand__icon {
    display: block;
}

.sidebar-collapse.sidebar-mini .main-sidebar.nx-sidebar:not(.sidebar-focused):not(:hover) .nav-header,
.sidebar-collapse.sidebar-mini-md .main-sidebar.nx-sidebar:not(.sidebar-focused):not(:hover) .nav-header,
.sidebar-collapse.sidebar-mini-xs .main-sidebar.nx-sidebar:not(.sidebar-focused):not(:hover) .nav-header {
    display: none;
}

.sidebar-collapse.sidebar-mini .main-sidebar.nx-sidebar:not(.sidebar-focused):not(:hover) .nav-sidebar > .nav-item > .nav-link,
.sidebar-collapse.sidebar-mini-md .main-sidebar.nx-sidebar:not(.sidebar-focused):not(:hover) .nav-sidebar > .nav-item > .nav-link,
.sidebar-collapse.sidebar-mini-xs .main-sidebar.nx-sidebar:not(.sidebar-focused):not(:hover) .nav-sidebar > .nav-item > .nav-link {
    width: 3rem;
    height: 2.7rem;
    margin: 0.25rem auto;
    padding: 0;
    justify-content: center;
    grid-template-columns: 1fr;
}

.sidebar-collapse.sidebar-mini .main-sidebar.nx-sidebar:not(.sidebar-focused):not(:hover) .nav-sidebar > .nav-item > .nav-link p,
.sidebar-collapse.sidebar-mini-md .main-sidebar.nx-sidebar:not(.sidebar-focused):not(:hover) .nav-sidebar > .nav-item > .nav-link p,
.sidebar-collapse.sidebar-mini-xs .main-sidebar.nx-sidebar:not(.sidebar-focused):not(:hover) .nav-sidebar > .nav-item > .nav-link p {
    display: none;
}

.sidebar-collapse.sidebar-mini .main-sidebar.nx-sidebar:not(.sidebar-focused):not(:hover) .nav-sidebar > .nav-item > .nav-link .nav-icon,
.sidebar-collapse.sidebar-mini-md .main-sidebar.nx-sidebar:not(.sidebar-focused):not(:hover) .nav-sidebar > .nav-item > .nav-link .nav-icon,
.sidebar-collapse.sidebar-mini-xs .main-sidebar.nx-sidebar:not(.sidebar-focused):not(:hover) .nav-sidebar > .nav-item > .nav-link .nav-icon {
    margin: 0 !important;
    width: auto;
    font-size: 0.95rem;
}

.sidebar-collapse.sidebar-mini .main-sidebar.nx-sidebar:not(.sidebar-focused):not(:hover) .nav-sidebar > .nav-item > .nav-link::before,
.sidebar-collapse.sidebar-mini-md .main-sidebar.nx-sidebar:not(.sidebar-focused):not(:hover) .nav-sidebar > .nav-item > .nav-link::before,
.sidebar-collapse.sidebar-mini-xs .main-sidebar.nx-sidebar:not(.sidebar-focused):not(:hover) .nav-sidebar > .nav-item > .nav-link::before {
    display: none;
}

.sidebar-collapse.sidebar-mini .main-sidebar.nx-sidebar:not(.sidebar-focused):not(:hover) .nav-item.has-treeview > .nav-treeview,
.sidebar-collapse.sidebar-mini-md .main-sidebar.nx-sidebar:not(.sidebar-focused):not(:hover) .nav-item.has-treeview > .nav-treeview,
.sidebar-collapse.sidebar-mini-xs .main-sidebar.nx-sidebar:not(.sidebar-focused):not(:hover) .nav-item.has-treeview > .nav-treeview {
    display: none !important;
}

.main-header.nx-topbar {
    background: #ffffff !important;
    border-bottom: 1px solid #e8ebf2 !important;
    padding: 0.55rem 1rem;
}

.nx-topbar .nx-topbar-shell {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
}

.nx-topbar .nx-topbar-left {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 1;
    min-width: 0;
}

.nx-topbar .nx-topbar-left-links,
.nx-topbar .nx-topbar-actions {
    align-items: center;
}

.nx-topbar .nx-topbar-left-links .nav-item,
.nx-topbar .nx-topbar-actions .nav-item {
    display: flex;
    align-items: center;
}

.nx-topbar .nx-topbar-left-links .nav-link,
.nx-topbar .nx-topbar-actions .nav-link {
    width: 1.9rem;
    height: 1.9rem;
    min-width: 1.9rem;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e3e7ee;
    border-radius: 999px;
    color: #8a92a3 !important;
    font-size: 0.76rem;
    background: #fff;
    transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.nx-topbar .nx-topbar-left-links .nav-link:hover,
.nx-topbar .nx-topbar-actions .nav-link:hover {
    color: #4f596c !important;
    border-color: #cfd6e2;
    background: #f7f9fc;
}

.nx-topbar .nx-topbar-search {
    position: relative;
    flex: 1;
    max-width: 14.5rem;
    min-width: 9rem;
}

.nx-topbar .nx-topbar-search i {
    position: absolute;
    top: 50%;
    left: 0.7rem;
    transform: translateY(-50%);
    color: #a4acbb;
    font-size: 0.78rem;
    pointer-events: none;
}

.nx-topbar .nx-topbar-search input {
    width: 100%;
    height: 1.7rem;
    border: 1px solid #edf0f6;
    border-radius: 0.38rem;
    background: #f5f7fc;
    color: #4f5869;
    font-size: 0.75rem;
    padding: 0 0.65rem 0 1.85rem;
}

.nx-topbar .nx-topbar-search input:focus {
    outline: none;
    border-color: #d7deea;
    background: #ffffff;
}

.nx-topbar .nx-topbar-search input::placeholder {
    color: #adb4c3;
}

.nx-topbar .nx-user-avatar {
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #b78f67, #99724c);
    border: 1px solid #e4d7ca;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
}

.nx-topbar .nx-user-photo {
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid #e5ddd3;
}

.nx-topbar .nx-user-toggle,
.nx-topbar .nx-topbar-actions .nx-user-toggle {
    width: auto;
    min-width: auto;
    height: auto;
    border: 0;
    background: transparent;
    margin-left: 0.4rem;
}

.nx-topbar .nx-user-toggle:hover,
.nx-topbar .nx-topbar-actions .nx-user-toggle:hover {
    background: transparent;
    border-color: transparent;
}

.nx-topbar .nx-user-toggle.dropdown-toggle::after {
    display: none;
}

.nx-topbar .navbar-search-block {
    top: 2.2rem;
    right: 0;
    width: 15rem;
}

.nx-topbar .navbar-search-block .input-group {
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.08);
}

.nx-topbar .user-menu .dropdown-menu {
    margin-top: 0.45rem;
}

.nx-topbar .user-menu .dropdown-menu.nx-user-dropdown {
    width: 18.75rem;
    min-width: 18.75rem;
    padding: 0.75rem;
    border: 1px solid #d9e4f0;
    border-radius: 0.92rem;
    background: #f9fcff;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.14);
}

.nx-user-dropdown > li {
    list-style: none;
}

.nx-user-dropdown > li + li {
    margin-top: 0.4rem;
}

.nx-user-dropdown__header {
    display: grid;
    grid-template-columns: 3.15rem 1fr;
    align-items: center;
    column-gap: 0.78rem;
    min-height: 4.1rem;
    padding: 0.45rem 0.45rem 0.72rem;
    margin-bottom: 0.1rem;
    border-bottom: 1px solid #e4edf7;
}

.nx-user-dropdown__avatar {
    width: 3.15rem;
    height: 3.15rem;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid #d7e8f7;
}

.nx-user-dropdown__meta {
    display: grid;
    row-gap: 0.28rem;
    min-width: 0;
}

.nx-user-dropdown__name {
    margin: 0;
    color: #20314a;
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.18;
}

.nx-user-dropdown__email {
    margin: 0;
    color: #5f738c;
    font-size: 0.75rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nx-user-dropdown__role {
    display: inline-flex;
    align-items: center;
    height: 1.35rem;
    padding: 0 0.5rem;
    border-radius: 999px;
    background: #e4f2ff;
    color: #1f74b1;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    justify-self: start;
}

.nx-user-dropdown .dropdown-item {
    border-radius: 0.68rem;
    padding: 0.62rem 0.72rem;
}

.nx-user-dropdown .nx-user-dropdown__item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: #2e425c;
    font-size: 0.83rem;
    font-weight: 600;
    margin: 0;
}

.nx-user-dropdown .nx-user-dropdown__item i {
    width: 1.05rem;
    text-align: center;
    color: #5c7d9c;
}

.nx-user-dropdown .nx-user-dropdown__item:hover {
    background: #edf6ff;
    color: #17314d;
}

.nx-user-dropdown .nx-user-dropdown__logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.6rem;
    margin-top: 0.15rem;
    border: 1px solid #f1cad0;
    background: #fff4f5;
    color: #c43346;
    font-size: 0.86rem;
    font-weight: 700;
    padding: 0.62rem 0.72rem;
}

.nx-user-dropdown .nx-user-dropdown__logout i {
    width: auto;
    color: #d63d50;
}

.nx-user-dropdown .nx-user-dropdown__logout:hover {
    background: #ffe9ec;
    color: #ab2335;
}

@media (max-width: 991.98px) {
    .main-header.nx-topbar {
        padding: 0.48rem 0.62rem;
    }

    .nx-topbar .nx-topbar-search {
        max-width: 12rem;
    }

    .nx-topbar .user-menu .dropdown-menu.nx-user-dropdown {
        width: min(19rem, calc(100vw - 1.2rem));
        min-width: 0;
    }
}

@media (max-width: 767.98px) {
    .nx-topbar .nx-topbar-shell {
        gap: 0.45rem;
    }

    .nx-topbar .nx-topbar-search {
        max-width: none;
        min-width: 0;
    }

    .nx-topbar .nx-topbar-actions .nav-item:not(.user-menu) {
        display: none;
    }

    .nx-topbar .nx-topbar-left-links .nav-link {
        border-color: #d9deea;
    }
}

@media (max-width: 991.98px) {
    body.sidebar-open .main-sidebar.nx-sidebar,
    body.sidebar-open .main-sidebar.nx-sidebar::before {
        margin-left: 0 !important;
    }

    body:not(.sidebar-open) .main-sidebar.nx-sidebar,
    body:not(.sidebar-open) .main-sidebar.nx-sidebar::before {
        margin-left: calc(-1 * var(--nx-sidebar-width)) !important;
    }

    /* On small screens, open sidebar should render in full mode (not mini icons-only). */
    body.sidebar-open .main-sidebar.nx-sidebar .nx-sidebar-brand {
        min-height: 84px !important;
        padding: 0 1.35rem !important;
        justify-content: flex-start !important;
        border-bottom: 1px solid var(--nx-sidebar-line) !important;
    }

    body.sidebar-open .main-sidebar.nx-sidebar .nx-sidebar-brand::before {
        width: 4.75rem !important;
        height: 3px !important;
    }

    body.sidebar-open .main-sidebar.nx-sidebar .nx-sidebar-brand__full {
        display: block !important;
    }

    body.sidebar-open .main-sidebar.nx-sidebar .nx-sidebar-brand__icon {
        display: none !important;
    }

    body.sidebar-open .main-sidebar.nx-sidebar .nav-header {
        display: block !important;
    }

    body.sidebar-open .main-sidebar.nx-sidebar .nav-sidebar > .nav-item > .nav-link {
        width: auto !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0.63rem 1.35rem !important;
        justify-content: flex-start !important;
        grid-template-columns: 1rem 1fr !important;
    }

    body.sidebar-open .main-sidebar.nx-sidebar .nav-sidebar > .nav-item > .nav-link p {
        display: flex !important;
    }

    body.sidebar-open .main-sidebar.nx-sidebar .nav-sidebar > .nav-item > .nav-link .nav-icon {
        margin: 0 !important;
        width: 1rem !important;
        font-size: 0.88rem !important;
    }

    body.sidebar-open .main-sidebar.nx-sidebar .nav-sidebar > .nav-item > .nav-link::before {
        display: block !important;
    }

    body.sidebar-open .main-sidebar.nx-sidebar .nav-item.has-treeview > .nav-treeview {
        display: none !important;
    }

    body.sidebar-open .main-sidebar.nx-sidebar .nav-item.has-treeview.menu-open > .nav-treeview {
        display: block !important;
    }

    body.sidebar-open .main-sidebar.nx-sidebar {
        top: 0 !important;
        left: 0 !important;
        bottom: auto !important;
        height: auto !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    body.sidebar-open .main-sidebar.nx-sidebar::before {
        height: 100% !important;
        border-radius: 0 !important;
    }

    body.sidebar-open .main-sidebar.nx-sidebar .sidebar {
        height: auto !important;
        max-height: 100dvh !important;
        overflow: hidden;
    }

    body.sidebar-open .main-sidebar.nx-sidebar .sidebar > nav {
        flex: 0 1 auto;
        max-height: calc(100dvh - 11.5rem);
        overflow-y: auto;
    }

    body.sidebar-open .main-sidebar.nx-sidebar .nx-sidebar-mobile-close {
        display: block;
        margin-top: 0;
        padding: 0.8rem 1rem 1rem;
        border-top: 1px solid var(--nx-sidebar-line);
        background: linear-gradient(180deg, rgba(43, 53, 72, 0) 0%, rgba(37, 50, 69, 0.85) 55%, rgba(37, 50, 69, 1) 100%);
    }

    .nx-sidebar .nx-sidebar-mobile-close__btn {
        width: 100%;
        height: 2.65rem;
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 0.72rem;
        background: rgba(18, 28, 42, 0.55);
        color: #e9f2fb;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.45rem;
        font-size: 0.82rem;
        font-weight: 600;
        letter-spacing: 0.02em;
        transition: background-color 0.18s ease, border-color 0.18s ease;
    }

    .nx-sidebar .nx-sidebar-mobile-close__btn:hover,
    .nx-sidebar .nx-sidebar-mobile-close__btn:focus {
        background: rgba(20, 190, 255, 0.2);
        border-color: rgba(20, 190, 255, 0.55);
        outline: none;
    }

    .nx-sidebar .nx-sidebar-mobile-close__btn i {
        font-size: 0.82rem;
    }
}

.navbar-white.navbar-light:not(.nx-topbar) {
    border-bottom: 1px solid var(--nx-border-soft) !important;
}

.page-link {
    color: var(--nx-primary-strong);
}

.page-link:hover {
    color: var(--nx-primary-strong);
    background: var(--nx-primary-soft);
    border-color: #b9e5fa;
}

.page-item.active .page-link {
    background-color: var(--nx-primary);
    border-color: var(--nx-primary);
}

.nx-flash-stack {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 4.15rem);
    right: 0.95rem;
    width: min(24rem, calc(100vw - 1.25rem));
    display: grid;
    gap: 0.55rem;
    z-index: 1060;
    pointer-events: none;
}

.modal.show .modal-header {
    cursor: move;
}

.modal.show .modal-header .close,
.modal.show .modal-header button,
.modal.show .modal-header a,
.modal.show .modal-header input,
.modal.show .modal-header select,
.modal.show .modal-header textarea,
.modal.show .modal-header label {
    cursor: pointer;
}

.nx-modal-dragging,
.nx-modal-dragging * {
    user-select: none;
}

.nx-flash {
    --nx-flash-accent: #38bdf8;
    pointer-events: auto;
    position: relative;
    display: grid;
    grid-template-columns: 1.2rem 1fr auto;
    align-items: center;
    column-gap: 0.58rem;
    min-height: 3rem;
    padding: 0.68rem 0.72rem 0.7rem 0.72rem;
    border-radius: 0.62rem;
    border: 1px solid #d8e5f2;
    border-left: 4px solid var(--nx-flash-accent);
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.13);
    color: #1f2a3a;
    transition: opacity 0.2s ease, transform 0.2s ease;
    overflow: hidden;
    max-height: 12rem;
    animation: nxFlashAutoHide 0.24s ease forwards;
    animation-delay: var(--nx-flash-life, 5.2s);
}

.nx-flash.is-hiding {
    animation: none !important;
    opacity: 0;
    transform: translateX(0.7rem);
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
}

.nx-flash * {
    pointer-events: auto;
}

.nx-flash__icon {
    color: var(--nx-flash-accent);
    font-size: 0.92rem;
    text-align: center;
}

.nx-flash__text {
    font-size: 0.78rem;
    line-height: 1.35;
    color: #20344d;
    padding-right: 0.15rem;
}

.nx-flash__close {
    width: 1.3rem;
    height: 1.3rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #93a3b7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.64rem;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.nx-flash__close:hover,
.nx-flash__close:focus {
    color: #51637a;
    background: #f0f5fa;
    outline: none;
}

.nx-flash__bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--nx-flash-accent);
    transform-origin: left center;
    animation: nxFlashLife linear forwards;
    animation-duration: var(--nx-flash-life, 5.2s);
}

.nx-flash--success {
    --nx-flash-accent: #22c55e;
}

.nx-flash--error {
    --nx-flash-accent: #ef4444;
}

.nx-flash--warning {
    --nx-flash-accent: #f59e0b;
}

.nx-flash--info {
    --nx-flash-accent: #38bdf8;
}

@keyframes nxFlashLife {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

@keyframes nxFlashAutoHide {
    to {
        opacity: 0;
        transform: translateX(0.7rem);
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        border-width: 0;
    }
}

@media (max-width: 767.98px) {
    .nx-flash-stack {
        top: calc(env(safe-area-inset-top, 0px) + 3.65rem);
        right: 0.62rem;
        left: 0.62rem;
        width: auto;
    }
}
