.app-nav-section-title {
    padding: 10px 12px 8px;
    color: var(--app-text-soft);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.app-nav-divider {
    height: 1px;
    margin: 14px 12px;
    background: rgba(203, 213, 225, 0.78);
}

.app-nav-group {
    margin-bottom: 6px;
}

.app-nav-link,
.app-nav-child-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 10px 14px;
    border-radius: 16px;
    color: var(--app-text-muted);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.app-nav-link:hover,
.app-nav-link:focus,
.app-nav-link.is-active,
.app-nav-link.is-active-parent,
.app-nav-group.is-open > .app-nav-link,
.app-nav-child-link:hover,
.app-nav-child-link:focus,
.app-nav-child-link.is-active {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.09), rgba(14, 165, 233, 0.05));
    color: var(--app-color-primary);
}

.app-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.74);
    color: inherit;
    flex: 0 0 auto;
}

.app-nav-icon svg {
    width: 18px;
    height: 18px;
}

.app-nav-label,
.app-nav-child-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-nav-chevron {
    margin-left: auto;
    color: var(--app-text-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.app-nav-chevron svg {
    width: 16px;
    height: 16px;
}

.app-nav-children {
    position: relative;
    display: grid;
    gap: 6px;
    margin: 6px 0 10px 22px;
    padding-left: 16px;
}

[dir='rtl'] .app-nav-children {
    margin-right: 22px;
    margin-left: 0;
    padding-right: 16px;
    padding-left: 0;
}

.app-nav-children::before {
    content: '';
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 1px;
    width: 1px;
    background: rgba(203, 213, 225, 0.84);
}

[dir='rtl'] .app-nav-children::before {
    right: 1px;
    left: auto;
}

.app-nav-child-link {
    min-height: 42px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
}

.app-nav-child-link .app-nav-icon {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.76);
}

.app-nav-child-link .app-nav-icon svg {
    width: 14px;
    height: 14px;
}

.app-topbar-button,
.app-topbar-pill,
.app-topbar-cta,
.app-topbar-user,
.app-company-switch__summary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid rgba(203, 213, 225, 0.84);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--app-text-muted);
    font-size: 13px;
    font-weight: 700;
    box-shadow: var(--app-shadow-xs);
}

.app-topbar-button,
.app-topbar-user,
.app-company-switch__summary {
    position: relative;
}

.app-topbar-button:hover,
.app-topbar-cta:hover,
.app-topbar-user:hover,
.app-company-switch__summary:hover,
.app-topbar-button:focus,
.app-topbar-cta:focus,
.app-topbar-user:focus,
.app-company-switch__summary:focus {
    color: var(--app-text);
    transform: translateY(-1px);
    box-shadow: var(--app-shadow-sm);
}

.app-topbar-button svg,
.app-topbar-cta svg,
.app-topbar-user svg,
.app-company-switch__summary svg {
    width: 18px;
    height: 18px;
    color: inherit;
}

.app-topbar-button--icon-only {
    justify-content: center;
    width: 46px;
    padding: 0;
}

.app-topbar-cta {
    background: linear-gradient(135deg, var(--app-color-primary), #1d4ed8);
    color: #fff;
    border-color: transparent;
}

.app-topbar-pill {
    background: rgba(15, 23, 42, 0.04);
    color: var(--app-text-soft);
}

.app-topbar-user {
    max-width: 220px;
}

.app-topbar-user > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-company-switch {
    position: relative;
    min-width: 0;
    max-width: min(36vw, 420px);
}

.app-company-switch__summary {
    max-width: 100%;
}

.app-company-switch summary,
.app-topbar-dropdown > summary,
.app-topbar-user-menu > summary {
    list-style: none;
    cursor: pointer;
}

.app-company-switch summary::-webkit-details-marker,
.app-topbar-dropdown > summary::-webkit-details-marker,
.app-topbar-user-menu > summary::-webkit-details-marker {
    display: none;
}

.app-company-switch__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(14, 165, 233, 0.12));
    color: var(--app-color-primary);
    font-size: 12px;
    font-weight: 800;
    overflow: hidden;
}

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

.app-company-switch__text {
    display: grid;
    min-width: 0;
}

.app-company-switch__text span {
    color: var(--app-text-soft);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.app-company-switch__text strong {
    color: var(--app-text);
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-company-switch__menu,
.app-topbar-dropdown__menu,
.app-topbar-user-menu__menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 260px;
    display: none;
    padding: 10px;
    border: 1px solid rgba(203, 213, 225, 0.92);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: var(--app-shadow-md);
}

.app-topbar-user-menu__menu,
.app-topbar-dropdown__menu {
    left: auto;
    right: 0;
}

.app-company-switch[open] > .app-company-switch__menu,
.app-topbar-dropdown[open] > .app-topbar-dropdown__menu,
.app-topbar-user-menu[open] > .app-topbar-user-menu__menu {
    display: block;
}

.app-company-switch__menu-head {
    padding: 12px 14px;
    margin-bottom: 8px;
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.06);
}

.app-company-switch__menu-label {
    display: block;
    color: var(--app-text-soft);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.app-company-switch__menu-name {
    display: block;
    margin-top: 4px;
    color: var(--app-text);
    font-size: 16px;
    font-weight: 800;
}

.app-company-switch__menu-copy,
.app-menu-link,
.app-user-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 12px;
    border-radius: 14px;
    color: var(--app-text-muted);
    font-size: 13px;
    font-weight: 700;
}

.app-menu-link:hover,
.app-user-link:hover {
    background: rgba(37, 99, 235, 0.06);
    color: var(--app-text);
}

.app-menu-link svg,
.app-user-link svg {
    width: 16px;
    height: 16px;
    color: inherit;
}

#toast-container {
    z-index: 999999;
}

.app-topbar-notifications {
    position: relative;
}

.app-topbar-notifications .dropdown-menu,
.app-company-switch__menu,
.app-topbar-dropdown__menu,
.app-topbar-user-menu__menu {
    z-index: 1200;
}

.app-topbar-notifications__menu {
    left: auto !important;
    right: 0;
    width: min(420px, calc(100vw - 24px));
    max-height: min(72vh, 560px);
    height: auto !important;
    overflow-y: auto;
}

.app-topbar-notifications .notifications_count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 22px;
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    line-height: 1;
    font-size: 11px;
}

#toast-container > div {
    width: 360px;
    padding: 16px 18px 16px 54px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    box-shadow: var(--app-shadow-lg);
    opacity: 1;
    background: rgba(15, 23, 42, 0.92);
    color: #e2e8f0;
}

#toast-container > div:hover {
    box-shadow: var(--app-shadow-lg);
}

#toast-container > .toast-success {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.94), rgba(21, 128, 61, 0.94));
}

#toast-container > .toast-error {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.94), rgba(153, 27, 27, 0.94));
}

#toast-container > .toast-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.96), rgba(180, 83, 9, 0.94));
}

#toast-container > .toast-info {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.94), rgba(30, 64, 175, 0.94));
}

@media (max-width: 991px) {
    .app-company-switch {
        max-width: 100%;
    }

    .app-company-switch__summary,
    .app-topbar-user {
        max-width: none;
    }

    .app-company-switch__menu,
    .app-topbar-dropdown__menu,
    .app-topbar-user-menu__menu {
        min-width: min(100vw - 48px, 320px);
    }
}

@media (max-width: 767px) {
    .app-company-switch__text {
        display: none;
    }
}