.site-header {
    background: var(--color-primary);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-bottom: 4px solid var(--color-accent-yellow);
}

.site-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.site-logo-link {
    display: block;
    flex: 0 0 auto;
    border-radius: var(--radius);
    text-decoration: none;
}

.site-logo-link:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.site-logo {
    height: 72px;
    width: auto;
    display: block;
}

.site-branding__text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.site-title {
    margin: 0;
    font-size: 1.55rem;
    line-height: 1.2;
}

.site-nav {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.site-nav__link {
    color: #fff;
    font-weight: 500;
    opacity: 0.95;
}

.site-nav__link:hover {
    color: var(--color-accent-yellow);
    text-decoration: none;
}

.page {
    max-width: 1200px;
    margin: 1.25rem auto 2rem;
    padding: 0 1rem;
}

.page-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.55rem 0.75rem;
    margin-bottom: 1rem;
}

.page-header > .actions,
.page-header > .masterdata-toolbar,
.page-header > .page-header__actions,
.page-header > a.button,
.page-header > button.button,
.page-header > form {
    grid-column: 1 / -1;
    justify-self: start;
}

.page-header__status {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.page-header__navigation {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    font-size: 0.84rem;
}

.page-header__navigation a {
    color: var(--color-muted);
    text-decoration: none;
}

.page-header__navigation a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

.page-actions-menu {
    position: relative;
}

.page-actions-menu > summary {
    list-style: none;
}

.page-actions-menu > summary::-webkit-details-marker {
    display: none;
}

.page-actions-menu[open] > summary {
    border-color: var(--color-border-strong);
    background: linear-gradient(180deg, #fff, #e9edf3);
}

.page-actions-menu__menu {
    position: absolute;
    left: 0;
    top: calc(100% + 0.35rem);
    z-index: 1000;
    min-width: 240px;
    padding: 0.35rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

.page-actions-menu__menu a,
.page-actions-menu__menu button {
    display: block;
    width: 100%;
    padding: 0.48rem 0.58rem;
    border: 0;
    border-radius: 5px;
    background: none;
    color: var(--color-text);
    font: inherit;
    font-size: 0.9rem;
    line-height: 1.25;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.page-actions-menu__menu a:hover,
.page-actions-menu__menu button:hover {
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    text-decoration: none;
}

.page-actions-menu__menu form {
    margin: 0;
}

.page-actions-menu__separator {
    height: 1px;
    margin: 0.3rem 0.25rem;
    background: var(--color-border);
}

.page-actions-menu__danger {
    color: var(--color-danger) !important;
}

.page-actions-menu__danger:hover {
    background: #fff0f1 !important;
    color: var(--color-accent-red-dark) !important;
}

.page-title {
    margin: 0;
    font-size: 1.55rem;
    line-height: 1.2;
}

.actions {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

@media (max-width: 800px) {
    .site-header {
        padding: 0.7rem 1rem;
    }

    .page-header {
        grid-template-columns: 1fr;
    }

    .page-header__status {
        grid-column: 1;
        grid-row: auto;
        justify-self: end;
    }

    .page-actions-menu__menu {
        right: auto;
        left: 0;
    }
}
.site-nav__button {
    border: 0;
    background: none;
    padding: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
}
/* Dezente Querverweise zwischen fachlich verknüpften Stammdaten. */
.entity-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: .12rem;
    color: var(--color-muted);
    font-size: .72rem;
    line-height: 1;
    text-decoration: none;
    vertical-align: baseline;
}
.entity-link-icon:hover,
.entity-link-icon:focus-visible {
    color: var(--color-primary-dark);
    text-decoration: none;
}

.entity-text-link {
    color: inherit;
    text-decoration: none;
}
.entity-text-link:hover,
.entity-text-link:focus-visible {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
    text-underline-offset: .14em;
}

/* Seitenoberfläche: einheitlich, sehr hell und nur dezent grau.
 * Die Regel liegt bewusst im globalen Layout, damit einzelne Bereiche keine
 * eigene weiße Leinwand über den Hub-Hintergrund legen. */
html {
    min-height: 100%;
    background: var(--color-bg-bottom, #f3f5f7);
}

body {
    background-color: var(--color-bg, #f7f8fa);
    background-image: linear-gradient(180deg, var(--color-bg-top, #fcfcfd) 0, var(--color-bg, #f7f8fa) 34rem, var(--color-bg-bottom, #f3f5f7) 100%);
    background-attachment: fixed;
}

main.page {
    background: transparent;
}

@media (max-width: 800px) {
    body {
        background-attachment: scroll;
    }
}
