:root {
    --noa-shell-border: #dce7eb;
    --noa-shell-muted: #64727d;
    --noa-shell-soft: #f4f8f9;
    --noa-shell-active: #e3f3f4;
    --noa-shell-active-text: #0f6870;
    --noa-shell-focus: #0c7a83;
}

.person-photo {
    width: var(--person-photo-size, 48px);
    height: var(--person-photo-size, 48px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 var(--person-photo-size, 48px);
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(145deg, #dff1f2, #eef6f8);
    color: #116f78;
    font-size: calc(var(--person-photo-size, 48px) * .31);
    font-weight: 800;
    letter-spacing: .02em;
    box-shadow: inset 0 0 0 1px rgba(17, 111, 120, .12);
}

.person-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

body.dark .person-photo {
    background: linear-gradient(145deg, #21454a, #293e46);
    color: #bce9e6;
    box-shadow: inset 0 0 0 1px rgba(188, 233, 230, .12);
}

body {
    background: #f4f7f9;
}

header.header-main {
    height: 76px;
}

.header-main .container-fluid {
    padding-inline: 1.25rem;
}

.noa-header-bar,
.noa-header-start,
.noa-header-actions {
    display: flex;
    align-items: center;
}

.noa-header-bar {
    min-height: 76px;
    justify-content: space-between;
    gap: 1rem;
}

.noa-header-start {
    flex: 1 1 auto;
    min-width: 0;
    gap: .8rem;
}

.noa-header-actions {
    flex: 0 0 auto;
    gap: .65rem;
}

.noa-icon-button,
.noa-theme-toggle {
    min-width: 46px;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    border: 1px solid var(--noa-shell-border);
    border-radius: 14px;
    background: #fff;
    color: #243842;
    box-shadow: 0 4px 14px rgba(35, 61, 75, .06);
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.noa-icon-button:hover,
.noa-theme-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(var(--primary), .55);
    background: rgba(var(--primary), .07);
}

.noa-icon-button:focus-visible,
.noa-theme-toggle:focus-visible,
#sidebar-menu a:focus-visible,
#module-search:focus-visible {
    outline: 3px solid rgba(var(--primary), .24);
    outline-offset: 2px;
}

.noa-theme-toggle {
    padding: 0 .95rem;
    font-size: .88rem;
    font-weight: 700;
    white-space: nowrap;
}

.noa-theme-toggle i,
.noa-icon-button i {
    font-size: 1.35rem;
}

.header-searchbar {
    width: min(100%, 560px) !important;
}

.header-searchbar .form-control {
    min-height: 46px;
    padding-left: 2.7rem;
    padding-right: 3rem;
    border: 1px solid var(--noa-shell-border);
    border-radius: 14px;
    background: var(--noa-shell-soft);
    box-shadow: none;
}

.header-searchbar .form-control:focus {
    border-color: rgba(var(--primary), .65);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(var(--primary), .1);
}

.header-searchbar .position-relative > i {
    position: absolute;
    left: 1rem;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    color: var(--noa-shell-muted);
}

.noa-search-shortcut {
    position: absolute;
    right: .85rem;
    top: 50%;
    transform: translateY(-50%);
    min-width: 25px;
    min-height: 25px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--noa-shell-border);
    border-radius: 7px;
    background: #fff;
    color: var(--noa-shell-muted);
    font: inherit;
    font-size: .78rem;
}

.noa-user-context {
    align-items: center;
    gap: .6rem;
    padding-right: .85rem;
    border-right: 1px solid var(--noa-shell-border);
}

.noa-user-context > span:last-child,
.noa-user-context small,
.noa-user-context strong {
    display: block;
}

.noa-user-context small {
    color: var(--noa-shell-muted);
    font-size: .7rem;
}

.noa-user-context strong {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .82rem;
}

.noa-user-avatar {
    width: 38px;
    height: 38px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(var(--primary), .12);
    color: rgb(var(--primary));
    font-weight: 800;
}

nav {
    border-right: 1px solid var(--noa-shell-border);
    box-shadow: 6px 0 24px rgba(28, 54, 67, .055);
}

nav .app-logo .logo {
    min-height: 88px;
    display: flex !important;
    align-items: center;
}

nav .app-logo .noa-sidebar-brand {
    gap: .55rem;
    padding-right: 2.7rem;
    overflow: hidden;
}

nav .app-logo .noa-sidebar-brand .noa-sidebar-caretime {
    width: 132px;
    flex: 0 0 132px;
}

.noa-sidebar-divider {
    width: 1px;
    height: 34px;
    flex: 0 0 1px;
    background: var(--noa-shell-border);
}

.noa-sidebar-powered {
    display: flex;
    align-items: center;
    gap: .25rem;
    min-width: 0;
}

.noa-sidebar-powered small {
    color: var(--noa-shell-muted);
    font-size: .52rem;
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1.1;
    text-transform: uppercase;
}

nav .app-logo .noa-sidebar-brand .noa-sidebar-powered img {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    object-fit: contain;
}

nav .app-logo .nav-profile {
    background: linear-gradient(135deg, rgba(var(--primary), .075), rgba(var(--secondary), .035));
}

.noa-account-trigger {
    min-width: 42px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .1rem;
    border: 1px solid var(--noa-shell-border);
    border-radius: 12px;
    background: #fff;
    color: #334852;
}

.noa-account-trigger > i:first-child {
    font-size: 1.45rem;
}

.noa-account-chevron {
    font-size: .72rem;
}

nav .app-logo .profile-menu-dropdown .dropdown-menu.noa-account-menu {
    width: 330px !important;
    max-width: calc(100vw - 24px);
    padding: .6rem;
    border: 1px solid var(--noa-shell-border);
    border-radius: 16px;
    box-shadow: 0 16px 42px rgba(26, 52, 65, .18);
}

.noa-account-summary {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .55rem;
}

.noa-account-summary > span:last-child,
.noa-account-summary strong,
.noa-account-summary small {
    display: block;
    min-width: 0;
}

.noa-account-summary > span:last-child {
    flex: 1 1 auto;
}

.noa-account-summary strong,
.noa-account-summary small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.noa-account-summary small {
    color: var(--noa-shell-muted);
    font-size: .75rem;
}

.noa-account-avatar {
    width: 42px;
    height: 42px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    border-radius: 12px;
    background: rgba(var(--primary), .12);
    color: rgb(var(--primary));
    font-weight: 800;
}

.noa-account-option {
    display: flex !important;
    align-items: center;
    gap: .7rem;
    width: 100%;
    padding: .7rem !important;
    border: 0;
    border-radius: 11px !important;
    white-space: normal !important;
}

.noa-account-option > i {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    border-radius: 11px;
    background: rgba(var(--primary), .09);
    color: rgb(var(--primary));
    font-size: 1.25rem;
}

.noa-account-option span,
.noa-account-option strong,
.noa-account-option small {
    display: block;
}

.noa-account-option small {
    margin-top: .1rem;
    color: var(--noa-shell-muted);
    font-size: .72rem;
}

.noa-account-option:hover {
    background: rgba(var(--primary), .07) !important;
}

.noa-logout-option,
.noa-logout-option > i {
    color: rgb(var(--danger)) !important;
}

.noa-logout-option > i {
    background: rgba(var(--danger), .09);
}

#sidebar-menu {
    padding-bottom: 1.75rem !important;
}

#sidebar-menu .menu-title {
    padding: 1.2rem 1.15rem .45rem;
}

#sidebar-menu .menu-title span {
    color: #72818a;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

#sidebar-menu > li:not(.menu-title):not(.noa-menu-empty) {
    padding-inline: .7rem;
}

#sidebar-menu > li > a {
    min-height: 46px;
    gap: .55rem;
    border-radius: 12px;
    line-height: 1.25;
}

#sidebar-menu > li > a i,
#sidebar-menu > li > a svg {
    flex: 0 0 24px;
}

#sidebar-menu > li > a:hover {
    background: rgba(var(--primary), .075);
    color: rgb(var(--primary));
}

#sidebar-menu > li.active-parent > a,
#sidebar-menu > li > a[aria-expanded="true"] {
    background: rgb(var(--primary));
    color: #fff !important;
    box-shadow: 0 7px 18px rgba(var(--primary), .2);
}

#sidebar-menu ul.collapse {
    margin: .35rem .55rem .55rem 1.6rem;
    padding: .25rem 0 .25rem .65rem;
    border-left: 2px solid rgba(var(--primary), .18);
}

#sidebar-menu ul.collapse.show {
    display: block !important;
    height: auto !important;
    visibility: visible !important;
}

#sidebar-menu ul.collapse li {
    padding: .12rem .25rem;
    line-height: 1.35;
    white-space: normal;
}

#sidebar-menu ul.collapse li a {
    position: relative;
    display: block;
    padding: .55rem .7rem;
    border-radius: 9px;
    color: #53636d;
    font-size: .88rem;
}

#sidebar-menu ul.collapse li a:hover,
#sidebar-menu ul.collapse li.active a,
#sidebar-menu ul.collapse li a[aria-current="page"] {
    background: var(--noa-shell-active);
    color: var(--noa-shell-active-text);
    font-weight: 700;
}

#sidebar-menu ul.collapse li.active a::before,
#sidebar-menu ul.collapse li a[aria-current="page"]::before {
    content: '';
    position: absolute;
    left: -.78rem;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgb(var(--primary));
    transform: translateY(-50%);
}

.noa-menu-empty {
    margin: 1.5rem .85rem;
    padding: 1.2rem !important;
    border: 1px dashed var(--noa-shell-border);
    border-radius: 14px;
    color: var(--noa-shell-muted);
    text-align: center;
}

.noa-menu-empty i,
.noa-menu-empty span {
    display: block;
}

.noa-menu-empty i {
    margin-bottom: .45rem;
    font-size: 1.7rem;
}

.noa-shortcuts {
    width: min(420px, 100vw) !important;
}

.noa-theme-options {
    display: grid;
    gap: .7rem;
}

.noa-theme-options button {
    display: flex;
    align-items: center;
    gap: .8rem;
    width: 100%;
    padding: .9rem;
    border: 1px solid var(--noa-shell-border);
    border-radius: 14px;
    background: #fff;
    color: #263b45;
    text-align: left;
}

.noa-theme-options button.selected {
    border-color: rgb(var(--primary));
    background: rgba(var(--primary), .09);
    box-shadow: inset 0 0 0 1px rgb(var(--primary));
}

.noa-theme-options button i {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    border-radius: 12px;
    background: rgba(var(--primary), .1);
    color: rgb(var(--primary));
    font-size: 1.4rem;
}

.noa-theme-options button strong,
.noa-theme-options button small {
    display: block;
}

.noa-theme-options button small {
    margin-top: .15rem;
    color: var(--noa-shell-muted);
}

.noa-text-size {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: .45rem;
}

.noa-text-size li {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .5rem !important;
    border: 1px solid var(--noa-shell-border) !important;
    border-radius: 11px !important;
    text-align: center;
}

.noa-eyebrow {
    display: block;
    margin-bottom: .2rem;
    color: rgb(var(--primary));
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.noa-shortcut-grid {
    display: grid;
    gap: .75rem;
}

.noa-shortcut-card {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: 1rem;
    border: 1px solid var(--noa-shell-border);
    border-radius: 15px;
    background: #fff;
    color: #263b45;
    transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.noa-shortcut-card:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--primary), .5);
    box-shadow: 0 8px 22px rgba(25, 60, 75, .09);
    color: rgb(var(--primary));
}

.noa-shortcut-card i {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    border-radius: 13px;
    background: rgba(var(--primary), .1);
    color: rgb(var(--primary));
    font-size: 1.5rem;
}

.noa-shortcut-card strong,
.noa-shortcut-card small {
    display: block;
}

.noa-shortcut-card small {
    margin-top: .15rem;
    color: var(--noa-shell-muted);
}

body.dark {
    --noa-shell-border: #414956;
    --noa-shell-muted: #aeb8c4;
    --noa-shell-soft: #252a33;
    --noa-shell-active: #223f43;
    --noa-shell-active-text: #8fd9df;
    background: #181820;
}

body.dark .header-main,
body.dark .noa-icon-button,
body.dark .noa-theme-toggle,
body.dark .noa-account-trigger,
body.dark .noa-shortcut-card,
body.dark .noa-theme-options button,
body.dark .noa-search-shortcut,
body.dark .offcanvas {
    background: #24272d;
    color: #f3f6f8;
}

body.dark .header-searchbar .form-control,
body.dark .header-searchbar .form-control:focus {
    background: #20232a;
    color: #f5f7fa;
}

body.dark .header-searchbar .form-control::placeholder {
    color: #aeb8c4;
}

body.dark #sidebar-menu .menu-title span,
body.dark #sidebar-menu ul.collapse li a {
    color: #b8c1ca;
}

body.dark #sidebar-menu ul.collapse li a:hover,
body.dark #sidebar-menu ul.collapse li.active a,
body.dark #sidebar-menu ul.collapse li a[aria-current="page"] {
    color: var(--noa-shell-active-text);
}

body.dark .noa-shortcut-card small {
    color: #aeb8c4;
}

body.dark .noa-account-menu {
    background: #24272d;
}

body.dark .noa-account-option {
    color: #f3f6f8;
}

@media (max-width: 767.98px) {
    .header-main .container-fluid {
        padding-inline: .75rem;
    }

    .noa-header-bar {
        min-height: 68px;
        gap: .55rem;
    }

    .noa-header-start,
    .noa-header-actions {
        gap: .45rem;
    }

    .noa-icon-button,
    .noa-theme-toggle {
        min-width: 42px;
        min-height: 42px;
        padding: 0;
        border-radius: 12px;
    }

    .header-searchbar .form-control {
        min-height: 42px;
        padding-right: .65rem;
        font-size: .85rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .noa-icon-button,
    .noa-theme-toggle,
    .noa-shortcut-card {
        transition: none;
    }
}
