/* =========================================================
   App header
   ========================================================= */

.app-desktop-header {
    position: relative;
    z-index: 100;
    width: 100%;
    min-height: 64px;
    background: #ffffff;
    border-bottom: 1px solid #e4e9e6;
    box-shadow: 0 2px 10px rgba(22, 32, 51, 0.04);
}

.app-desktop-header-inner {
    width: min(100%, 1600px);
    min-height: 64px;
    margin: 0 auto;
    padding: 0 72px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
}

.app-brand {
    color: #07111f;
    font-size: 22px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.035em;
    text-decoration: none;
    white-space: nowrap;
}

.app-brand:hover {
    color: #07111f;
}

.app-desktop-menu {
    display: flex;
    align-items: center;
    gap: 24px;
    min-width: 0;
}

.app-desktop-menu-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    color: #424b57;
    font-size: 16px;
    line-height: 1;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.app-desktop-menu-link:hover {
    color: #0f9360;
}

.app-desktop-menu-link.active {
    color: #07111f;
    font-weight: 700;
}

.app-desktop-menu-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 3px;
    border-radius: 999px;
    background: #0f9360;
    opacity: 0;
}

.app-desktop-userbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    min-width: 0;
}

.app-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 0;
}

.app-user-label {
    color: #7a8580;
    font-size: 11px;
    line-height: 1.1;
    font-weight: 700;
}

.app-user-name {
    max-width: 240px;
    color: #162033;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-header-btn {
    min-height: 38px;
    padding: 0 18px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 14px;
    line-height: 1;
    font-weight: 800;
    white-space: nowrap;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        transform 0.12s ease;
}

.app-header-btn:active {
    transform: translateY(1px);
}

.app-header-btn-outline {
    border: 1px solid #9aa5af;
    background: #ffffff;
    color: #667085;
}

.app-header-btn-outline:hover {
    border-color: #0f9360;
    background: #f3faf6;
    color: #0f9360;
}

.app-header-btn-primary {
    border: 1px solid #0f9360;
    background: #0f9360;
    color: #ffffff;
}

.app-header-btn-primary:hover {
    border-color: #0d7f53;
    background: #0d7f53;
    color: #ffffff;
}

/* =========================================================
   Mobile topbar
   ========================================================= */

.mobile-topbar {
    min-height: 56px;
    padding: 0 14px;
    background: #ffffff;
    border-bottom: 1px solid #e4e9e6;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mobile-topbar-brand {
    color: #07111f;
    font-size: 20px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.035em;
    text-decoration: none;
    white-space: nowrap;
}

.mobile-topbar-brand:hover {
    color: #07111f;
}

.mobile-topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

.mobile-topbar-user {
    max-width: 170px;
    color: #5f6b65;
    font-size: 12px;
    line-height: 1.1;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-topbar-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 50%;
    border: 1px solid #dfe8e2;
    background: #ffffff;
    color: #0f9360;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 6px 14px rgba(22, 32, 51, 0.06);
}

.mobile-topbar-icon i {
    font-size: 18px;
    line-height: 1;
}

.mobile-topbar-icon:hover {
    color: #0d7f53;
    background: #f3faf6;
}

@media (max-width: 991.98px) {
    .app-desktop-header {
        display: none;
    }

    .mobile-topbar {
        display: flex;
    }
}

@media (min-width: 992px) {
    .mobile-topbar {
        display: none;
    }
}

@media (max-width: 1180px) and (min-width: 992px) {
    .app-desktop-header-inner {
        padding: 0 32px;
        gap: 20px;
    }

    .app-desktop-menu {
        gap: 18px;
    }

    .app-user-name {
        max-width: 180px;
    }
}