:root {
    --shell-ink: #17324d;
    --shell-muted: #65758b;
    --shell-line: #dbe4ed;
    --shell-soft: #f4f8fb;
    --shell-blue: #0788c8;
    --shell-blue-dark: #056da3;
    --shell-sidebar-width: 272px;
    --shell-topbar-height: 76px;
    --shell-shadow: 0 12px 32px rgba(31, 61, 88, 0.09);
}

body {
    background: #eef3f7;
}

.page-container {
    background: linear-gradient(145deg, #f1f5f8 0%, #e8eef2 100%);
}

/* Desktop sidebar */
.app-sidebar.menu-sidebar {
    background: #fff;
    border-right: 1px solid var(--shell-line);
    box-shadow: 7px 0 28px rgba(32, 61, 87, 0.05);
    overflow: hidden;
    width: var(--shell-sidebar-width);
    z-index: 6;
}

.app-sidebar .app-sidebar__brand {
    background: #fff;
    border-bottom: 1px solid var(--shell-line);
    border-right: 0;
    box-shadow: none;
    height: var(--shell-topbar-height);
    padding: 0 25px;
}

.app-sidebar__brand-link {
    align-items: center;
    color: var(--shell-ink) !important;
    display: flex;
    font-size: 20px;
    font-weight: 600;
    gap: 10px;
    letter-spacing: -0.02em;
    min-width: 0;
    text-decoration: none !important;
}

.app-sidebar__logo {
    height: auto;
    max-height: 45px;
    max-width: 132px;
    object-fit: contain;
    width: 132px;
}

.app-sidebar__brand-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-sidebar .menu-sidebar__content {
    height: calc(100vh - var(--shell-topbar-height));
}

.app-sidebar .navbar-sidebar {
    padding: 24px 16px 34px;
}

.app-sidebar__label {
    color: #8b9aab;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin: 0 10px 10px;
    text-transform: uppercase;
}

.app-sidebar .navbar__list > li {
    margin-bottom: 5px;
}

.app-sidebar .navbar__list li a.app-menu-link {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #4e6175;
    display: flex;
    font-size: 13px;
    font-weight: 500;
    min-height: 46px;
    padding: 10px 12px;
    position: relative;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.app-sidebar .navbar__list li a.app-menu-link > i:not(.app-menu-dot) {
    align-items: center;
    background: #edf5f9;
    border-radius: 8px;
    color: #54758c;
    display: inline-flex;
    flex: 0 0 30px;
    font-size: 13px;
    height: 30px;
    justify-content: center;
    margin-right: 11px;
    transition: background-color 160ms ease, color 160ms ease;
}

.app-sidebar .navbar__list li a.app-menu-link:hover,
.app-sidebar .navbar__list li.is-current-section > a.app-menu-link,
.app-sidebar .navbar__list li a.app-menu-link.is-current {
    background: #f2f9fc;
    border-color: #d9ebf4;
    color: var(--shell-blue-dark);
    transform: translateX(2px);
}

.app-sidebar .navbar__list li.is-current-section > a.app-menu-link > i,
.app-sidebar .navbar__list li a.app-menu-link.is-current > i {
    background: linear-gradient(135deg, var(--shell-blue), var(--shell-blue-dark));
    color: #fff;
}

.app-sidebar .app-menu-category {
    padding-right: 34px !important;
}

.app-sidebar .app-menu-category::after {
    color: #91a1b0;
    content: '\f105';
    font-family: 'Font Awesome 5 Free';
    font-size: 11px;
    font-weight: 900;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 160ms ease;
}

.app-sidebar .app-menu-category.open::after {
    transform: translateY(-50%) rotate(90deg);
}

.app-sidebar .navbar__list .navbar__sub-list {
    border-left: 1px solid #dce8ef;
    margin: 5px 0 9px 27px;
    padding: 2px 0 2px 17px;
}

.app-sidebar .navbar__list .navbar__sub-list li {
    margin: 2px 0;
}

.app-sidebar .navbar__list .navbar__sub-list li a.app-menu-sub-link {
    border-radius: 7px;
    color: #68798a;
    display: flex;
    font-size: 11px;
    line-height: 1.35;
    padding: 9px 9px;
    transition: background-color 150ms ease, color 150ms ease;
}

.app-sidebar .navbar__list .navbar__sub-list li a.app-menu-sub-link:hover,
.app-sidebar .navbar__list .navbar__sub-list li a.app-menu-sub-link.is-current {
    background: #eaf6fb;
    color: var(--shell-blue-dark);
    font-weight: 600;
}

.app-menu-dot {
    color: #c5d0d9;
    flex: 0 0 6px;
    font-size: 5px;
    margin: 5px 8px 0 0;
}

.app-menu-dot.is-new {
    color: var(--shell-blue);
}

/* Desktop topbar */
.app-topbar.header-desktop {
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--shell-line);
    box-shadow: 0 5px 20px rgba(31, 61, 88, 0.06);
    height: var(--shell-topbar-height);
    left: var(--shell-sidebar-width);
    z-index: 5;
}

.app-topbar .section__content {
    overflow: visible;
}

.app-topbar .container-fluid {
    padding-left: 0;
    padding-right: 0;
}

.app-topbar__inner {
    align-items: center;
    display: flex;
    justify-content: flex-end;
    min-height: 48px;
}

.app-topbar .app-topbar__actions {
    float: none !important;
    gap: 12px;
    justify-content: flex-end;
}

.app-topbar .header-button {
    float: none !important;
    margin: 0 !important;
}

.app-icon-button {
    align-items: center;
    background: #f5f9fb;
    border: 1px solid #d5e1e9;
    border-radius: 11px;
    color: #47667d;
    cursor: pointer;
    display: inline-flex;
    font-size: 15px;
    height: 42px;
    justify-content: center;
    position: relative;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
    width: 42px;
}

.app-icon-button:hover,
.app-icon-button:focus {
    background: #eaf6fb;
    border-color: #8dc8e1;
    color: var(--shell-blue-dark);
    outline: 0;
    transform: translateY(-1px);
}

.app-icon-button__badge {
    align-items: center;
    background: #e55252;
    border: 2px solid #fff;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 8px;
    font-weight: 700;
    height: 18px;
    justify-content: center;
    min-width: 18px;
    padding: 0 4px;
    position: absolute;
    right: -6px;
    top: -6px;
}

.app-account__item {
    align-items: center;
    background: #fff;
    border: 1px solid #d5e1e9;
    border-radius: 13px;
    display: flex;
    min-height: 48px;
    padding: 5px 34px 5px 6px;
    position: relative;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.app-account__item:hover,
.app-account__item.show-dropdown {
    border-color: #9acde3;
    box-shadow: 0 7px 18px rgba(31, 82, 116, 0.11);
}

.app-account__item::after {
    color: #708396;
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-size: 10px;
    font-weight: 900;
    position: absolute;
    right: 12px;
    top: 19px;
}

.app-account__item .app-account__avatar {
    background: #edf4f8;
    border-radius: 9px;
    float: none;
    height: 36px;
    width: 36px;
}

.app-account__avatar img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.app-account__item .app-account__summary {
    margin: 0;
    max-width: 220px;
    padding: 0 10px;
}

.app-account__summary a,
.app-account__summary span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-account__summary a.js-acc-btn {
    color: var(--shell-ink);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    text-transform: none;
}

.app-account__summary a.js-acc-btn::after {
    display: none;
}

.app-account__summary span {
    color: var(--shell-muted);
    font-size: 9px;
    line-height: 1.35;
    margin-top: 1px;
}

.app-environment-badge {
    background: #fff1f1;
    border: 1px solid #f1c8c8;
    border-radius: 999px;
    color: #ad3f3f;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 3px 6px;
}

.app-account-dropdown.account-dropdown {
    border: 1px solid var(--shell-line);
    border-radius: 14px;
    box-shadow: 0 18px 42px rgba(25, 52, 77, 0.18);
    min-width: 330px;
    overflow: hidden;
    right: 0;
    top: 58px;
}

.app-account-dropdown .app-account-dropdown__info {
    align-items: center;
    background: linear-gradient(135deg, #f5fbfe, #edf7fb);
    border: 0;
    display: flex;
    padding: 18px;
}

.app-account-dropdown__info .image {
    border-radius: 10px !important;
    flex: 0 0 48px;
    float: none !important;
    height: 48px !important;
    width: 48px !important;
}

.app-account-dropdown__info .content {
    margin: 0 !important;
    min-width: 0;
    padding: 0 0 0 12px !important;
}

.app-account-dropdown__info .name {
    color: var(--shell-ink);
    font-size: 13px;
    font-weight: 700;
    margin: 0;
}

.app-account-dropdown__info .email {
    color: var(--shell-muted) !important;
    display: block;
    font-size: 10px !important;
    margin-top: 3px;
    overflow-wrap: anywhere;
}

.app-account-dropdown .account-dropdown__body {
    padding: 8px;
}

.app-account-dropdown .account-dropdown__item a,
.app-account-dropdown .account-dropdown__footer a {
    align-items: center;
    border-radius: 8px;
    color: #40566b;
    display: flex;
    font-size: 12px;
    min-height: 40px;
    padding: 10px 12px;
}

.app-account-dropdown .account-dropdown__item a:hover,
.app-account-dropdown .account-dropdown__footer a:hover {
    background: #eaf6fb;
    color: var(--shell-blue-dark);
}

.app-account-dropdown .account-dropdown__item a i,
.app-account-dropdown .account-dropdown__footer a i {
    color: #58758b;
    font-size: 15px;
    margin-right: 10px;
}

.app-account-dropdown .account-dropdown__footer {
    border-top: 1px solid var(--shell-line);
    padding: 8px;
}

.app-impersonate {
    border-top: 1px solid #e5edf2;
    margin: 8px 4px 0;
    padding: 14px 8px 6px;
}

.app-impersonate__heading {
    align-items: center;
    color: var(--shell-ink);
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.app-impersonate__heading > i {
    align-items: center;
    background: #eaf5fb;
    border-radius: 8px;
    color: var(--shell-blue-dark);
    display: inline-flex;
    flex: 0 0 32px;
    height: 32px;
    justify-content: center;
}

.app-impersonate__heading strong,
.app-impersonate__heading span {
    display: block;
}

.app-impersonate__heading strong {
    font-size: 11px;
}

.app-impersonate__heading span {
    color: var(--shell-muted);
    font-size: 9px;
    margin-top: 1px;
}

.app-impersonate__control {
    display: grid;
    gap: 7px;
    grid-template-columns: minmax(0, 1fr) 38px;
}

.app-impersonate__control input {
    border-color: #cbd9e3;
    border-radius: 8px;
    font-size: 11px;
    height: 38px;
}

.app-impersonate__control button,
.app-impersonate__button {
    align-items: center;
    background: linear-gradient(135deg, var(--shell-blue), var(--shell-blue-dark));
    border: 0;
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    justify-content: center;
}

.app-impersonate__button {
    font-size: 11px;
    gap: 8px;
    min-height: 38px;
    width: 100%;
}

/* Mobile navigation */
.app-mobile-header.header-mobile {
    background: #fff;
    border-bottom: 1px solid var(--shell-line);
    box-shadow: 0 5px 20px rgba(31, 61, 88, 0.08);
    position: fixed;
    z-index: 30;
}

.app-mobile-header .app-mobile-header__bar {
    height: 72px;
    padding: 0;
}

.app-mobile-header .header-mobile-inner {
    height: 72px;
}

.app-mobile-brand {
    align-items: center;
    color: var(--shell-ink) !important;
    display: inline-flex;
    font-size: 18px;
    font-weight: 600;
    gap: 8px;
    text-decoration: none !important;
}

.app-mobile-brand img {
    height: auto;
    max-height: 44px;
    max-width: 116px;
    object-fit: contain;
    width: 116px;
}

.app-mobile-toggle.hamburger {
    background: #f2f7fa;
    border: 1px solid #d5e1e9;
    border-radius: 10px;
    height: 42px;
    width: 42px;
}

.app-mobile-toggle .hamburger-inner,
.app-mobile-toggle .hamburger-inner::before,
.app-mobile-toggle .hamburger-inner::after {
    background-color: #37556d !important;
    border-radius: 2px !important;
}

.app-mobile-header .app-mobile-nav {
    background: rgba(245, 249, 251, 0.98);
    border-top: 1px solid var(--shell-line);
    box-shadow: 0 18px 36px rgba(24, 51, 75, 0.18);
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    padding: 12px 0 18px;
    top: 72px;
}

.app-mobile-header .app-mobile-nav .container-fluid {
    padding: 0 14px;
}

.app-mobile-user {
    align-items: center;
    background: #fff;
    border: 1px solid var(--shell-line);
    border-radius: 12px;
    display: grid;
    gap: 10px;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    margin-bottom: 10px;
    padding: 10px;
}

.app-mobile-user img {
    background: #edf4f8;
    border-radius: 9px;
    height: 38px;
    object-fit: cover;
    width: 38px;
}

.app-mobile-user strong,
.app-mobile-user div span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-mobile-user strong {
    color: var(--shell-ink);
    font-size: 12px;
}

.app-mobile-user div span {
    color: var(--shell-muted);
    font-size: 9px;
    margin-top: 2px;
}

.app-mobile-account-tools {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.app-mobile-account-link,
.app-mobile-impersonate {
    background: #fff;
    border: 1px solid var(--shell-line);
    border-radius: 11px;
}

.app-mobile-account-link {
    align-items: center;
    color: #40596e;
    display: grid;
    gap: 10px;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    min-height: 54px;
    padding: 9px 11px;
}

.app-mobile-account-link:hover,
.app-mobile-account-link:focus {
    background: #edf8fc;
    border-color: #b9dce9;
    color: var(--shell-blue-dark);
    text-decoration: none;
}

.app-mobile-account-link > i:first-child,
.app-mobile-impersonate__heading > i {
    align-items: center;
    background: #eaf5fb;
    border-radius: 8px;
    color: var(--shell-blue-dark);
    display: inline-flex;
    font-size: 13px;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.app-mobile-account-link strong,
.app-mobile-account-link small,
.app-mobile-impersonate__heading strong,
.app-mobile-impersonate__heading small {
    display: block;
}

.app-mobile-account-link strong,
.app-mobile-impersonate__heading strong {
    color: var(--shell-ink);
    font-size: 11px;
}

.app-mobile-account-link small,
.app-mobile-impersonate__heading small {
    color: var(--shell-muted);
    font-size: 9px;
    margin-top: 1px;
}

.app-mobile-account-link > i:last-child {
    color: #8395a6;
    font-size: 9px;
}

.app-mobile-impersonate {
    padding: 10px 11px;
}

.app-mobile-impersonate__heading {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 34px minmax(0, 1fr);
    margin-bottom: 9px;
}

.app-mobile-impersonate__control {
    display: grid;
    gap: 7px;
    grid-template-columns: minmax(0, 1fr) 38px;
}

.app-mobile-impersonate__control input {
    border-color: #cad8e2;
    border-radius: 8px;
    font-size: 11px;
    height: 38px;
}

.app-mobile-impersonate__control button,
.app-mobile-impersonate__restore {
    align-items: center;
    background: linear-gradient(135deg, var(--shell-blue), var(--shell-blue-dark));
    border: 0;
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    justify-content: center;
}

.app-mobile-impersonate__restore {
    font-size: 11px;
    gap: 7px;
    min-height: 38px;
    width: 100%;
}

.app-mobile-header .navbar-mobile__list {
    background: transparent;
}

.app-mobile-header .navbar-mobile__list > li {
    margin-bottom: 5px;
}

.app-mobile-header .navbar-mobile__list li a.app-mobile-menu-link {
    align-items: center;
    background: #fff;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #476075;
    display: flex;
    font-size: 13px;
    min-height: 46px;
    padding: 9px 12px !important;
    position: relative;
}

.app-mobile-header .navbar-mobile__list li a.app-mobile-menu-link > i {
    align-items: center;
    background: #edf5f9;
    border-radius: 8px;
    color: #54758c;
    display: inline-flex;
    flex: 0 0 30px;
    font-size: 13px;
    height: 30px;
    justify-content: center;
    margin-right: 11px;
}

.app-mobile-header .navbar-mobile__list li a.app-mobile-menu-link:hover,
.app-mobile-header .navbar-mobile__list li.is-current-section > a.app-mobile-menu-link,
.app-mobile-header .navbar-mobile__list li a.app-mobile-menu-link.is-current {
    background: #edf8fc;
    border-color: #cae4f0;
    color: var(--shell-blue-dark);
}

.app-mobile-header .app-mobile-category::after {
    color: #8092a3;
    content: '\f105';
    font-family: 'Font Awesome 5 Free';
    font-size: 11px;
    font-weight: 900;
    margin-left: auto;
    transition: transform 160ms ease;
}

.app-mobile-header .app-mobile-category.open::after {
    transform: rotate(90deg);
}

.app-mobile-header .navbar-mobile-sub__list {
    background: transparent;
    border-left: 1px solid #cedfe8;
    margin: 5px 0 8px 25px;
    padding: 2px 0 2px 14px;
}

.app-mobile-header .navbar-mobile-sub__list li a.app-mobile-sub-link {
    background: transparent;
    border: 0;
    border-radius: 7px;
    color: #687b8d;
    font-size: 11px;
    padding: 9px 10px;
}

.app-mobile-header .navbar-mobile-sub__list li a.app-mobile-sub-link.is-current {
    background: #e6f4fa;
    color: var(--shell-blue-dark);
    font-weight: 600;
}

.app-mobile-logout {
    border-top: 1px solid var(--shell-line);
    margin-top: 10px;
    padding-top: 10px;
}

@media (min-width: 992px) {
    .page-container,
    .page-container2 {
        padding-left: var(--shell-sidebar-width);
    }

    .main-content {
        padding-top: 108px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .app-topbar .header-wrap .account-item > .content {
        display: block;
    }

    .app-account__summary {
        max-width: 155px !important;
    }
}

@media (max-width: 991px) {
    .page-container {
        top: 72px;
    }

    .main-content {
        padding-top: 34px;
    }
}

@media (max-width: 575px) {
    .app-mobile-header .header-mobile__bar .container-fluid {
        padding-left: 16px;
        padding-right: 16px;
    }

    .app-mobile-brand span {
        font-size: 16px;
    }
}
