.app-header {
    background: var(--color-surface);
}

.app-header__inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    height: var(--header-height);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--page-gutter);
}

.app-header__back-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--color-text);
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}

.app-header__back-btn:hover { background: var(--color-border); }

.app-header--back-mode .app-header__back-btn { display: flex; }
.app-header--back-mode .app-header__logo { display: none; }
.app-header--back-mode .app-header__page-title { display: block; }
.app-header--back-mode .app-header__location { display: none; }
.app-header--back-mode .app-header__login-btn { display: none; }

.app-header__page-title {
    display: none;
    flex: 1;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-header__logo {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: -0.03125rem;
    text-decoration: none;
    flex-shrink: 0;
}

.app-header__spacer { display: none; }

.app-header__location {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
    flex: 1;
}

.app-header__location svg { color: var(--color-primary); flex-shrink: 0; }
.app-header__location-text { max-width: 7.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-primary); font-weight: 600; }
.app-header__chevron { color: var(--color-primary); margin-left: -0.125rem; }

.app-header__location:hover { background: var(--color-background); }

.app-header__login-btn {
    background: var(--color-primary);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.5rem 1.125rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s;
}

.app-header__login-btn:hover { background: var(--color-primary-dark); }

.app-header__avatar-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: opacity 0.15s;
}

.app-header__avatar-btn:hover { opacity: 0.85; }

.app-header__avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.app-header--back-mode .app-header__avatar-btn { display: none; }

@media (min-width: 48rem) {
    .app-header__spacer { display: block; flex: 1; }
    .app-header__location { flex: 0 0 auto; }

    .app-header--back-mode .app-header__back-btn { display: none; }
    .app-header--back-mode .app-header__logo { display: block; }
    .app-header--back-mode .app-header__page-title { display: none; }
    .app-header--back-mode .app-header__location { display: flex; }
    .app-header--back-mode .app-header__login-btn { display: block; }
    .app-header--back-mode .app-header__avatar-btn { display: flex; }
}
