.sp-nav,
.sp-nav * {
    box-sizing: border-box;
}

.sp-nav {
    position: relative;
    z-index: 1000;
    width: 100%;
    height: 76px;
    border-bottom: 1px solid #e2e7f0;
    display: flex;
    align-items: center;
    color: #101b3b;
    background: #fff;
    font-family: 'Nunito', sans-serif;
}

.sp-nav-container {
    width: min(1180px, calc(100% - 40px));
    min-width: 0;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.sp-nav-brand {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.sp-nav-brand img {
    width: 176px;
    height: 52px;
    display: block;
    object-fit: contain;
}

.sp-nav-links,
.sp-nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sp-nav-links {
    margin-left: auto;
}

.sp-nav-actions {
    flex: 0 0 auto;
}

.sp-nav-link {
    border-radius: 6px;
    padding: 10px 13px;
    color: #65708a;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    transition: color .18s ease, background .18s ease;
}

.sp-nav-link:hover,
.sp-nav-link.is-active {
    color: #243fbd;
    background: #f1f4ff;
}

.sp-nav-button {
    min-height: 42px;
    border: 1px solid #dce2ec;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    color: #152044;
    background: #fff;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.sp-nav-button:hover {
    border-color: #bdc8eb;
    color: #243fbd;
    background: #f8f9fd;
    transform: translateY(-1px);
}

.sp-nav-button.is-active {
    border-color: #cbd2f5;
    color: #3730aa;
    background: #f1f2ff;
}

.sp-nav-button-primary {
    border-color: #4f46d9;
    color: #fff;
    background: #4f46d9;
    box-shadow: 0 8px 18px rgba(79, 70, 217, .18);
}

.sp-nav-button-primary:hover,
.sp-nav-button-primary.is-active {
    border-color: #4038c8;
    color: #fff;
    background: #4038c8;
}

.sp-nav-menu {
    position: relative;
}

.sp-nav-menu > summary {
    list-style: none;
}

.sp-nav-menu > summary::-webkit-details-marker {
    display: none;
}

.sp-nav-menu-trigger .bi-chevron-down {
    font-size: 9px;
    transition: transform .18s ease;
}

.sp-nav-menu[open] .sp-nav-menu-trigger .bi-chevron-down {
    transform: rotate(180deg);
}

.sp-nav-dropdown {
    position: absolute;
    z-index: 20;
    top: calc(100% + 9px);
    right: 0;
    width: 240px;
    border: 1px solid #dce2ec;
    border-radius: 7px;
    padding: 6px;
    background: #fff;
    box-shadow: 0 15px 34px rgba(22, 32, 67, .14);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: opacity .16s ease, visibility .16s ease, transform .16s ease;
}

.sp-nav-menu[open] .sp-nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sp-nav-dropdown::before {
    position: absolute;
    top: -5px;
    right: 19px;
    width: 9px;
    height: 9px;
    border-top: 1px solid #dce2ec;
    border-left: 1px solid #dce2ec;
    content: '';
    background: #fff;
    transform: rotate(45deg);
}

.sp-nav-dropdown-link {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    border-radius: 5px;
    padding: 9px;
    color: #26314f;
    text-decoration: none;
    transition: color .18s ease, background .18s ease;
}

.sp-nav-dropdown-link:hover,
.sp-nav-dropdown-link:focus-visible {
    color: #4f46d9;
    background: #f4f5ff;
    outline: none;
}

.sp-nav-dropdown-icon {
    width: 34px;
    height: 34px;
    border: 1px solid #dcdef5;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4f46d9;
    background: #f0f1ff;
    font-size: 14px;
}

.sp-nav-dropdown-copy strong,
.sp-nav-dropdown-copy span {
    display: block;
}

.sp-nav-dropdown-copy strong {
    color: #26314f;
    font-size: 10px;
    font-weight: 900;
}

.sp-nav-dropdown-copy span {
    margin-top: 2px;
    color: #8991a4;
    font-size: 8px;
    font-weight: 700;
}

.sp-nav-user-trigger {
    max-width: 190px;
}

.sp-nav-user-trigger > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sp-nav-logout {
    width: 100%;
    border: 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

@media (max-width: 760px) {
    .sp-nav {
        height: 66px;
    }

    .sp-nav-container {
        width: calc(100% - 24px);
        max-width: 1180px;
        gap: 12px;
    }

    .sp-nav-brand img {
        width: 137px;
        height: 44px;
    }

    .sp-nav-links {
        display: none;
    }

    .sp-nav-button {
        min-height: 38px;
        padding: 9px 12px;
        font-size: 11px;
    }

    .sp-nav-dropdown {
        width: min(240px, calc(100vw - 24px));
    }
}

@media (max-width: 380px) {
    .sp-nav-login span,
    .sp-nav-dashboard span,
    .sp-nav-user-trigger > span {
        display: none;
    }

    .sp-nav-login,
    .sp-nav-dashboard,
    .sp-nav-user-trigger {
        width: 38px;
        padding-right: 0;
        padding-left: 0;
    }
}

@media print {
    .sp-nav {
        display: none !important;
    }
}
