.topbar {
    position: sticky;
    z-index: 5;
    top: 0;
    background: #f7f7f8;
    border-bottom: 1px solid #d8dadd;
    color: #1f2126;
}

.topbar-inner {
    display: flex;
    width: 100%;
    height: 40px;
    align-items: center;
    gap: 16px;
    padding: 0 16px;
}

.brand {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    margin-right: 0;
    text-decoration: none;
}

.brand-mark {
    display: block;
    width: auto;
    height: 24px;
}

.brand-mark-mobile { display: none; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
}

.nav-links a {
    padding: 0 12px;
    color: #202227;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.nav-links a.active { font-weight: 700; }

.search-container {
    display: flex;
    flex: 1;
    min-width: 0;
    max-width: 440px;
    align-items: center;
    margin-right: 4px;
    margin-left: 0;
}

.search {
    display: flex;
    width: 100%;
    height: 28px;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid rgba(27, 37, 75, 0.12);
    border-radius: 8px;
    background: rgba(27, 37, 75, 0.08);
    color: #1f2126;
    font-size: 13px;
}

.search span { color: #6a6f81; }

.search-icon { width: 16px; height: 16px; }

.mobile-search-icon {
    display: none;
    margin-left: 10px;
    padding: 0;
    border: 0;
    background: none;
    color: #1f2126;
    cursor: pointer;
}

.account {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.account-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.auth-button {
    height: 34px;
    padding: 0 16px;
    border: 1px solid rgba(27, 37, 75, 0.25);
    border-radius: 8px;
    background: transparent;
    color: #6a6f81;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.auth-button.primary {
    border-color: #335fff;
    background: #335fff;
    color: #fff;
}

@media (max-width: 760px) {
    .topbar { border-bottom-color: white; }

    .topbar-inner {
        height: auto;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 0;
        padding: 8px 6px;
    }

    .brand {
        order: 1;
        margin-right: 0;
        padding-left: 4px;
    }

    .brand-mark-desktop { display: none; }
    .brand-mark-mobile { display: block; width: 32px; height: 32px; }

    .account {
        order: 2;
        display: flex;
        align-items: center;
        margin-left: auto;
    }

    .account-actions { gap: 4px; }

    .search-container {
        order: 3;
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        margin-left: 6px;
        padding-right: 2px;
    }

    .search { display: none; }

    .mobile-search-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 0;
        background: none;
        color: #6a6f81;
        cursor: pointer;
    }

    .mobile-search-icon svg { width: 28px; height: 28px; }

    .nav-links {
        order: 4;
        display: flex;
        width: 100%;
        justify-content: space-between;
        gap: 0;
        margin-top: 8px;
        padding: 8px 4px 0;
        border-top: 1px solid white;
    }

    .nav-links a {
        flex: 1;
        padding: 4px 0;
        color: #202227;
        font-size: 13px;
        font-weight: 500;
        text-align: center;
    }

    .nav-links a.active { font-weight: 700; background: none; }

    .auth-button {
        height: 32px;
        padding: 0 14px;
        border-radius: 8px;
        font-size: 13px;
    }
}
