/* Compact page-heading system for staff pages that share the refreshed workspace.
   Keep tenant colour in the saved-theme tokens; status and danger actions remain untouched. */
body.workspace-shell .workspace-page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem 1.25rem;
    min-width: 0;
    min-height: 0;
    padding: .78rem 1rem;
    margin: 0 0 .9rem;
    color: var(--workspace-ink);
    text-align: left !important;
    font-family: inherit;
    background: var(--workspace-surface) !important;
    border: 1px solid var(--workspace-line);
    border-left: 3px solid var(--workspace-accent);
    border-radius: 8px;
    box-shadow: none !important;
}

body.workspace-shell .workspace-page-heading.workspace-page-heading-vertical {
    align-items: flex-start;
    flex-direction: column;
    gap: .2rem;
}

body.workspace-shell .workspace-page-heading :is(.page-header-content, .page-header-text, .header-content, .page-title, .store-header-content) {
    min-width: 0;
    text-align: left !important;
    justify-content: flex-start;
}

body.workspace-shell .workspace-page-heading :is(.page-header-content, .header-content, .store-header-content) {
    margin: 0 !important;
    max-width: none;
}

body.workspace-shell .workspace-page-heading :is(h1, h2, .page-title) {
    margin: 0;
    /* The legacy .page-header h1 rule adds a 50px left inset for its old
       banner treatment. These compact workspace headings align to the card. */
    padding-left: 0 !important;
    color: var(--workspace-ink) !important;
    font-size: clamp(1.08rem, 1.7vw, 1.38rem);
    font-weight: 720;
    letter-spacing: -.025em;
    line-height: 1.25;
    text-align: left !important;
    font-family: inherit;
    justify-content: flex-start !important;
}

body.workspace-shell .workspace-page-heading :is(h1, h2, .page-title) > i,
body.workspace-shell .workspace-page-heading > i,
body.workspace-shell .workspace-page-heading .store-header-icon {
    color: var(--workspace-accent) !important;
}

body.workspace-shell .workspace-page-heading :is(p, .page-subtitle, .page-header-subtitle) {
    margin: .18rem 0 0;
    color: var(--workspace-ink-soft) !important;
    font-size: .82rem;
    line-height: 1.45;
}

body.workspace-shell .workspace-page-heading :is(.page-header-actions, .header-actions) {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .45rem;
}

body.workspace-shell .workspace-page-heading :is(.btn-primary, .btn-success, .btn-modern-primary) {
    color: var(--workspace-action-ink) !important;
    background: var(--workspace-action) !important;
    border-color: var(--workspace-action) !important;
    box-shadow: none !important;
}

body.workspace-shell .workspace-page-heading :is(.btn-outline-primary, .btn-outline-secondary, .btn-light, .btn-secondary) {
    color: var(--workspace-ink-soft) !important;
    background: var(--workspace-surface) !important;
    border-color: var(--workspace-line) !important;
    box-shadow: none !important;
}

body.workspace-shell .workspace-page-heading :is(.btn-primary, .btn-success, .btn-modern-primary, .btn-outline-primary, .btn-outline-secondary, .btn-light, .btn-secondary) {
    min-height: 34px;
    padding: .4rem .68rem;
    border-radius: 7px !important;
    font-size: .8rem;
    font-weight: 650;
}

body.workspace-shell .workspace-page-heading :is(.btn-primary, .btn-success, .btn-modern-primary, .btn-outline-primary, .btn-outline-secondary, .btn-light, .btn-secondary):hover {
    border-color: var(--workspace-accent-line) !important;
    background: var(--workspace-secondary-soft) !important;
    color: var(--workspace-accent) !important;
}

body.workspace-shell .workspace-page-heading .btn-primary:hover,
body.workspace-shell .workspace-page-heading .btn-success:hover,
body.workspace-shell .workspace-page-heading .btn-modern-primary:hover {
    color: var(--workspace-action-ink) !important;
    background: var(--workspace-action-hover) !important;
    border-color: var(--workspace-action-hover) !important;
}

body.workspace-shell .workspace-page-heading .header-nav {
    margin: 0 0 .18rem !important;
}

body.workspace-shell .workspace-page-heading .back-link {
    color: var(--workspace-ink-soft);
    font-size: .76rem;
}

/* Stock already uses the shared overview treatment; this is a small density
   adjustment to its existing card heading, not a second nested panel. */
body.workspace-shell .stock-overview-workspace > .modern-card > .card-header {
    min-height: 64px;
    padding: .85rem 1.15rem !important;
}

/* Legacy catalogue pages are ignored locally; use only their route identity and
   known existing header wrappers so a clean checkout needs no ignored-file edits. */
body.workspace-shell[data-route-controller="Release"][data-route-action="Search"] .creator-recommendations-section .section-header,
body.workspace-shell[data-route-controller="Release"][data-route-action="Search"] .variant-strip-header,
body.workspace-shell[data-route-controller="Release"][data-route-action="Search"] .results-toolbar,
body.workspace-shell[data-route-controller="Release"][data-route-action="InStoreSearch"] .results-toolbar {
    color: var(--workspace-ink);
    background: var(--workspace-surface);
    border-color: var(--workspace-line);
    box-shadow: none;
}

body.workspace-shell[data-route-controller="Release"][data-route-action="Search"] .creator-recommendations-section .section-header {
    border-left: 3px solid var(--workspace-accent);
    border-radius: 8px;
}

body.workspace-shell[data-route-controller="Release"][data-route-action="Search"] .variant-strip-header {
    border-bottom: 1px solid var(--workspace-line);
}

body.workspace-shell[data-route-controller="Release"][data-route-action="Search"] .creator-recommendations-section .section-title {
    color: var(--workspace-ink);
}

body.workspace-shell[data-route-controller="Release"][data-route-action="Search"] .creator-recommendations-section .section-title i {
    color: var(--workspace-accent);
}

body.workspace-shell[data-route-controller="Release"][data-route-action="Search"] .variant-strip-title {
    color: var(--workspace-ink);
}

body.workspace-shell[data-route-controller="Release"][data-route-action="Search"] .results-toolbar {
    border: 1px solid var(--workspace-line);
    border-left: 3px solid var(--workspace-accent);
    border-radius: 8px;
    padding: .45rem .65rem;
}

body.workspace-shell[data-route-controller="Release"][data-route-action="InStoreSearch"] .results-toolbar {
    border: 1px solid var(--workspace-line);
    border-left: 3px solid var(--workspace-accent);
    border-radius: 8px;
}

@media (max-width: 640px) {
    body.workspace-shell .workspace-page-heading {
        align-items: flex-start;
        flex-direction: column;
        padding: .72rem .82rem;
    }

    body.workspace-shell .workspace-page-heading :is(.page-header-actions, .header-actions) {
        width: 100%;
        justify-content: flex-start;
    }
}
