:root {
    /* Referenz-UI: ruhiges Blau, neutrale Flächen (Tailwind-ähnliche Palette) */
    --mhp-primary: #2563eb;
    --mhp-primary-soft: #eff6ff;
    --mhp-primary-dark: #1e3a8a;
    --mhp-accent: #16a34a;
    --mhp-accent-soft: #dcfce7;
    --mhp-bg: #f9fafb;
    --mhp-surface: #ffffff;
    --mhp-sidebar: #f3f4f6;
    --mhp-text: #111827;
    --mhp-muted: #6b7280;
    --mhp-border: #e5e7eb;
    --mhp-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    --mhp-shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.06);
    --mhp-control-radius: 13px;
    --mhp-control-surface: #ffffff;
    --mhp-control-surface-soft: #f8fafc;
    --mhp-control-border: rgba(148, 163, 184, 0.32);
    --mhp-control-border-active: rgba(37, 99, 235, 0.46);
    --mhp-control-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    --mhp-control-shadow-hover: 0 8px 20px rgba(15, 23, 42, 0.08);
    --mhp-focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.18);
    /* Zebra-Striping: ungerade = etwas dunkler, gerade = heller (dezent, neutral) */
    --mhp-table-zebra-odd: #eef1f4;
    --mhp-table-zebra-even: #fafbfc;
    /* editierbare Zeile: neutrale Grauabstufung (kein Gruen) */
    --mhp-table-zebra-editable-odd: #e6eaee;
    --mhp-table-zebra-editable-even: #eff2f5;
    --mhp-table-row-hover: #e3e7ec;
    --mhp-sticky-actions-width: 6.5rem;
    --mhp-sticky-note-width: 4.75rem;
}

html, body {
    font-family: "Segoe UI", Inter, system-ui, -apple-system, Arial, sans-serif;
    background: var(--mhp-bg);
    color: var(--mhp-text);
}

a, .btn-link {
    color: var(--mhp-primary);
}

.btn-primary {
    color: #fff;
    background-color: var(--mhp-primary);
    border-color: #1d4ed8;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(37, 99, 235, 0.28);
}

h1:focus {
    outline: none;
}

.global-scope-indicator {
    max-width: min(48vw, 360px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mhp-appbar {
    border-bottom: 1px solid var(--mhp-border);
    background: #ffffff !important;
    color: var(--mhp-primary-dark);
    min-height: 56px;
    padding-inline: 16px 20px;
    overflow: visible !important;
}

.mhp-appbar--toolbar .mud-toolbar-root {
    min-height: 56px;
    padding-inline: 4px;
}

/* Mud setzt auf der Toolbar häufig overflow:hidden — clippt TopRight-Badge an der oberen Kante */
.mhp-appbar .mud-toolbar-appbar,
.mhp-appbar .mud-toolbar,
.mhp-appbar .mud-toolbar-root {
    overflow: visible !important;
}

/* Layout-Wrapper: AppBar-Bereich darf Badge nicht nach oben abschneiden */
.mud-layout .mhp-appbar {
    overflow: visible !important;
}

.mhp-brand {
    min-width: 0;
    max-width: clamp(220px, 40vw, 360px);
    flex: 0 1 auto;
    align-items: center;
}

/* AppBar: MHP-Logo PNG (42–44 px, object-fit: contain) */
img.mhp-brand-logo {
    width: auto;
    height: 44px;
    max-height: 44px;
    min-height: 42px;
    max-width: 170px;
    object-fit: contain;
    object-position: left center;
    flex: 0 0 auto;
    display: block;
    border-radius: 4px;
    vertical-align: middle;
}

.mhp-brand-title {
    color: var(--mhp-primary-dark);
    line-height: 1.15;
    font-size: 1.02rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mhp-brand-subtitle {
    color: var(--mhp-muted);
    line-height: 1;
    font-size: 0.68rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mhp-drawer {
    border-right: 1px solid var(--mhp-border);
    background: var(--mhp-sidebar) !important;
}

.mhp-drawer .mud-drawer-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0 !important;
    overflow: hidden;
}

.mhp-drawer-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.mhp-drawer-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.mhp-nav-user-profile {
    flex: 0 0 auto;
    border-top: 1px solid rgba(148, 163, 184, 0.35);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.92) 0%, #fff 55%);
    padding: 14px 12px 16px;
    margin-top: 2px;
}

.mhp-nav-user-profile__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.96);
    cursor: default;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mhp-nav-user-profile__inner:hover {
    border-color: rgba(37, 99, 235, 0.22);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

.mhp-nav-user-profile__avatar {
    font-weight: 650;
    font-size: 0.9rem;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95), 0 2px 10px rgba(37, 99, 235, 0.18);
}

.mhp-nav-user-profile__text {
    flex: 1 1 auto;
    min-width: 0;
}

.mhp-nav-user-profile__name {
    font-weight: 650;
    font-size: 0.92rem;
    color: var(--mhp-primary-dark);
    line-height: 1.28;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}

.mhp-nav-user-profile__role {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--mhp-muted);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.mhp-nav-user-profile__chevron {
    color: var(--mhp-muted);
    opacity: 0.55;
    flex-shrink: 0;
}

.mhp-nav-user-profile__inner--clickable {
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    color: inherit;
    text-align: start;
    cursor: pointer;
}

.mhp-nav-user-profile__inner--clickable:focus-visible {
    outline: 2px solid var(--mhp-primary);
    outline-offset: 2px;
}

.mhp-nav-user-profile__avatar--image {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95), 0 2px 10px rgba(37, 99, 235, 0.18);
}

.mhp-nav-user-profile__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mhp-nav-user-profile__logout {
    text-decoration: none;
    appearance: none;
    -webkit-appearance: none;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.85);
    color: var(--mhp-muted);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.mhp-nav-user-profile__logout:hover {
    border-color: rgba(220, 38, 38, 0.45);
    color: #b91c1c;
    background: rgba(254, 242, 242, 0.85);
    box-shadow: 0 2px 10px rgba(220, 38, 38, 0.08);
}

.mhp-nav-user-profile__logout:focus-visible {
    outline: 2px solid #b91c1c;
    outline-offset: 2px;
}

.mhp-nav-user-profile__logout-label {
    white-space: nowrap;
}

.mhp-user-profile-dialog-root .mud-dialog-title {
    padding-bottom: 4px;
}

.mhp-user-profile-tabs .mud-tabs-panels {
    min-height: 220px;
}

.mhp-user-profile-dialog__photo {
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95), 0 2px 12px rgba(15, 23, 42, 0.12);
}

.mhp-user-profile-dialog__avatar-fallback {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95), 0 2px 12px rgba(15, 23, 42, 0.12);
}

.mhp-profile-upload-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 16px;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.mhp-profile-upload-label__input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    font-size: 0;
}

.mhp-nav-menu .mud-nav-link,
.mhp-nav-menu .mud-nav-group .mud-nav-link {
    border-radius: 10px;
    margin: 1px 2px;
    min-height: 40px;
    padding-top: 6px;
    padding-bottom: 6px;
}

.mhp-nav-menu .mud-nav-link.active {
    background: var(--mhp-primary-soft) !important;
    color: var(--mhp-primary) !important;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.mhp-nav-menu .mud-nav-link .mud-nav-link-text {
    font-size: 0.875rem;
}

.mhp-nav-menu .mud-nav-group .mud-nav-group-text {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--mhp-muted);
    text-transform: none;
}

.mhp-nav-menu .mud-nav-group .mud-nav-link {
    margin-inline-start: 4px;
}

.mhp-nav-pin-row {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 1px 2px;
    min-height: 40px;
    border-radius: 10px;
}

.mhp-nav-pin-row:hover {
    background: rgba(15, 23, 42, 0.04);
}

.mhp-nav-pin-row .mhp-nav-pin-row-link.mud-nav-link {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}

.mhp-nav-pin-btn-wrap {
    flex: 0 0 auto;
    align-self: center;
    display: flex;
    align-items: center;
}

/* Ruhigere Admin-Navigation: Pinnadel nur auf Hover (oder wenn aktiv angepinnt). */
.mhp-nav-pin-row--pin-hover .mhp-nav-pin-btn-wrap {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
}

.mhp-nav-pin-row--pin-hover:hover .mhp-nav-pin-btn-wrap {
    opacity: 1;
    pointer-events: auto;
}

/* Pinnadel: kleinere Glyphe, ausreichende Klickfläche (nur Optik, siehe PinableNavLink.razor). */
.mhp-nav-pin-btn.mud-icon-button {
    flex: 0 0 auto;
    align-self: center;
    margin-inline-end: 1px;
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    padding: 0;
    color: var(--mud-palette-text-secondary, #64748b) !important;
}

.mhp-nav-pin-btn.mud-icon-button .mud-icon-root {
    font-size: 17px !important;
    width: 17px !important;
    height: 17px !important;
}

.mhp-nav-pin-btn:hover {
    background: rgba(15, 23, 42, 0.06) !important;
}

.mhp-nav-pin-btn.mhp-nav-pin-btn--active {
    color: var(--mud-palette-primary, #2563eb) !important;
}

.mhp-nav-brand-inline {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 6px 6px 14px;
    padding: 8px 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(226, 232, 240, 0.9);
    min-width: 0;
}

.mhp-nav-brand-logo-wrap {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(145deg, #3b82f6 0%, #1e40af 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(30, 64, 175, 0.28);
}

/* Nav-Drawer: MHP-Logo PNG (34–36 px) */
img.mhp-nav-brand-logo {
    width: auto;
    height: 26px;
    max-height: 28px;
    min-height: 22px;
    max-width: 120px;
    object-fit: contain;
    object-position: center;
    flex: 0 0 auto;
    display: block;
    border-radius: 2px;
    filter: brightness(0) invert(1);
}

.mhp-nav-brand-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mhp-nav-brand-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--mhp-primary-dark);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.mhp-nav-brand-subtitle {
    font-size: 0.68rem;
    font-weight: 400;
    color: var(--mhp-muted);
    line-height: 1.25;
}

.mhp-main-content {
    background: transparent;
}

.mhp-content-shell {
    min-height: calc(100vh - 132px);
    padding-top: 2px;
}

.mhp-footer {
    display: flex;
    justify-content: center;
    margin: 14px 24px 18px;
    padding: 10px 12px;
    border-top: 1px solid var(--mhp-border);
    color: var(--mhp-muted);
}

.mhp-page .mhp-page-header,
.mhp-page-header--ref {
    border: 1px solid var(--mhp-border);
    background: #ffffff;
    box-shadow: var(--mhp-shadow-soft);
    margin-top: 2px;
    border-radius: 14px;
}

.mhp-page-title {
    font-weight: 700 !important;
    letter-spacing: -0.02em;
    color: var(--mhp-primary-dark) !important;
    font-size: clamp(1.35rem, 2vw, 1.65rem) !important;
}

.mhp-page-description {
    color: var(--mhp-muted) !important;
    max-width: 72ch;
}

.mhp-page .mhp-page-surface,
.mhp-page-surface--ref {
    border: 1px solid var(--mhp-border);
    box-shadow: var(--mhp-shadow-soft);
    background-color: var(--mhp-surface);
    border-radius: 14px;
}

.mhp-page .mhp-page-content {
    padding-top: 0.9rem;
}

.mhp-page-content--flat {
    padding: 1rem 1.25rem 1.25rem;
}

/* Inhalt bleibt branding-frei: kein Logo/Wasserzeichen im Seitenbereich */
.mhp-content-shell,
.mhp-page,
.mhp-page-header,
.mhp-page-surface {
    background-image: none !important;
}

.mhp-content-shell::before,
.mhp-content-shell::after,
.mhp-page::before,
.mhp-page::after,
.mhp-page-header::before,
.mhp-page-header::after,
.mhp-page-surface::before,
.mhp-page-surface::after {
    content: none !important;
    display: none !important;
    background: none !important;
}

.mhp-content-shell img[src*="mhp-brand-logo"] {
    display: none !important;
}

/* Harte Sicherheitsregel: Brand-Logo nur im Layout, nie im Content/Seitenheader */
img[src*="mhp-brand-logo"]:not(.mhp-brand-logo):not(.mhp-nav-brand-logo) {
    display: none !important;
}

.mhp-filter-panel {
    border: 1px solid var(--mhp-border);
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: var(--mhp-shadow-soft);
    margin-bottom: 0.9rem;
}

.mhp-action-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

/* Gemeinsames ruhiges Aktionsdesign fuer Startseite, Schnellaktionen und Toolbar-Aktionen. */
.mhp-action-bar .mud-button-root:not(.mud-icon-button),
.mhp-home-action-links--final .mud-button-root:not(.mud-icon-button),
.mhp-unified-search-row .mud-button-root:not(.mud-icon-button),
.mhp-unified-bulk-toolbar__actions .mud-button-root:not(.mud-icon-button),
.mhp-unified-top-toolbar__actions .mud-button-root:not(.mud-icon-button),
.mhp-desktop-panel .mud-button-root:not(.mud-icon-button) {
    min-height: 38px;
    border-radius: var(--mhp-control-radius) !important;
    padding-inline: 14px !important;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: none;
    border-color: var(--mhp-control-border) !important;
    box-shadow: var(--mhp-control-shadow);
    transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease, background-color 0.14s ease, color 0.14s ease;
}

.mhp-action-bar .mud-button-root:not(.mud-icon-button):hover,
.mhp-home-action-links--final .mud-button-root:not(.mud-icon-button):hover,
.mhp-unified-search-row .mud-button-root:not(.mud-icon-button):hover,
.mhp-unified-bulk-toolbar__actions .mud-button-root:not(.mud-icon-button):hover,
.mhp-unified-top-toolbar__actions .mud-button-root:not(.mud-icon-button):hover,
.mhp-desktop-panel .mud-button-root:not(.mud-icon-button):hover {
    transform: translateY(-1px);
    box-shadow: var(--mhp-control-shadow-hover);
}

.mhp-action-bar .mud-button-root:not(.mud-icon-button):focus-visible,
.mhp-home-action-links--final .mud-button-root:not(.mud-icon-button):focus-visible,
.mhp-unified-search-row .mud-button-root:not(.mud-icon-button):focus-visible,
.mhp-unified-bulk-toolbar__actions .mud-button-root:not(.mud-icon-button):focus-visible,
.mhp-unified-top-toolbar__actions .mud-button-root:not(.mud-icon-button):focus-visible,
.mhp-desktop-panel .mud-button-root:not(.mud-icon-button):focus-visible {
    outline: none;
    box-shadow: var(--mhp-control-shadow), var(--mhp-focus-ring);
}

.mhp-action-bar .mud-button-root:not(.mud-icon-button):disabled,
.mhp-home-action-links--final .mud-button-root:not(.mud-icon-button):disabled,
.mhp-unified-search-row .mud-button-root:not(.mud-icon-button):disabled,
.mhp-unified-bulk-toolbar__actions .mud-button-root:not(.mud-icon-button):disabled,
.mhp-unified-top-toolbar__actions .mud-button-root:not(.mud-icon-button):disabled,
.mhp-desktop-panel .mud-button-root:not(.mud-icon-button):disabled {
    transform: none;
    box-shadow: none;
    opacity: 0.58;
}

/* --- Seiten-Audit: Hilfsklassen (statt Einzel-Inline-Styles) --- */
.mhp-minw-0 {
    min-width: 0;
}

.mhp-w-full {
    width: 100%;
}

.mhp-icon-muted {
    opacity: 0.65;
}

.mhp-toolbar-gap-wrap {
    gap: 0.5rem;
}

.mhp-truncate-max-11 {
    max-width: 11rem;
}

.mhp-truncate-max-18 {
    max-width: 18rem;
}

.mhp-truncate-max-28 {
    max-width: 28rem;
}

.mhp-text-pre-wrap {
    white-space: pre-wrap;
}

.mhp-minw-field-12 {
    min-width: 12rem;
}

.mhp-minw-field-14 {
    min-width: 14rem;
}

.mhp-minw-field-16 {
    min-width: 16rem;
}

.mhp-minw-field-18 {
    min-width: 18rem;
}

.mhp-minw-field-22 {
    min-width: 13.75rem;
}

.mhp-minw-user-stack {
    min-width: 150px;
}

.mhp-deploy-marker-panel {
    border: 1px solid var(--mhp-border);
}

.mhp-code-caption {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    word-break: break-all;
}

.mhp-section-subtitle {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--mhp-text);
    margin-bottom: 0.75rem;
}

.mhp-inline-section-title {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--mhp-text);
    margin: 0;
    line-height: 1.3;
}

.mhp-scroll-y-max-220 {
    max-height: 220px;
    overflow: auto;
}

/* Benutzer-Auswahl im Dialog "Kombination zuweisen": kompakte, scrollbare Liste mit
   Hover-Hervorhebung. Die selektierte Reihe bekommt einen dezenten Akzent. */
.mhp-assigncombo-userlist {
    max-height: 320px;
    overflow-y: auto;
}

.mhp-assigncombo-user-item {
    cursor: pointer;
    border-radius: 4px;
}

.mhp-assigncombo-user-item:hover {
    background-color: var(--mud-palette-action-default-hover);
}

.mhp-assigncombo-user-item--selected {
    background-color: var(--mud-palette-primary-hover);
}

.mhp-assigncombo-user-item--selected:hover {
    background-color: var(--mud-palette-primary-hover);
}

.mhp-nested-expand-cell {
    padding-left: 1.5rem;
    background: var(--mhp-bg);
    vertical-align: top;
}

.mhp-simple-table-on-surface {
    background: var(--mhp-surface);
}

/* --- Personal-Archiv Tabelle: stabile Spalten, sauberer Umbruch ------------------------------
   Root cause des bisherigen Ueberlagerns: MudTable nutzt table-layout: auto und auf <MudTd>
   wurde "text-truncate" + max-width gesetzt. white-space: nowrap zwingt Auto-Layout dazu,
   die Spalte zu erweitern, max-width auf einer Tabellenzelle wird im Auto-Layout nicht
   strikt durchgesetzt - lange Bezeichnungen liefen so optisch in Nachbarspalten.
   Loesung: table-layout: fixed + definierte Spaltenbreiten am <th>, Inhalte umbrechen,
   Betrags-/Zahlspalten bleiben rechtsbuendig und einzeilig. */
.mhp-archiv-personal-table .mud-table-container {
    overflow-x: auto;
}

.mhp-archiv-personal-table table {
    table-layout: fixed;
    width: 100%;
}

.mhp-archiv-personal-table thead th {
    vertical-align: middle;
    word-break: normal;
    white-space: normal;
}

.mhp-archiv-personal-table thead th:nth-child(1) { width: 5.5rem; }
.mhp-archiv-personal-table thead th:nth-child(4),
.mhp-archiv-personal-table thead th:nth-child(5) { width: 11.5rem; }
.mhp-archiv-personal-table thead th:nth-child(6) { width: 8rem; }

.mhp-archiv-personal-table thead th.mhp-archiv-personal-th--num {
    text-align: right;
}

.mhp-archiv-personal-table tbody tr.mhp-archiv-personal-main-row > td {
    vertical-align: top;
    line-height: 1.35;
}

.mhp-cell--wrap {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    overflow: visible !important;
    text-overflow: clip !important;
    vertical-align: top !important;
}

.mhp-cell--num {
    text-align: right !important;
    white-space: nowrap !important;
    font-variant-numeric: tabular-nums;
    vertical-align: top !important;
}

/* Detail-Tabelle innerhalb der ausgeklappten Zeile: gleiche Strategie, eigene Spaltenbreiten. */
.mhp-archiv-personal-detail-table {
    table-layout: fixed;
    width: 100%;
}

.mhp-archiv-personal-detail-table th,
.mhp-archiv-personal-detail-table td {
    vertical-align: top;
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
}

.mhp-archiv-personal-detail-table thead th.mhp-detail-col--person { width: 18%; }
.mhp-archiv-personal-detail-table thead th.mhp-detail-col--personnel { width: 11%; }
.mhp-archiv-personal-detail-table thead th.mhp-detail-col--tariff { width: 11%; }
.mhp-archiv-personal-detail-table thead th.mhp-detail-col--amount { width: 12%; text-align: right; }
.mhp-archiv-personal-detail-table thead th.mhp-detail-col--status { width: 18%; }
.mhp-archiv-personal-detail-table thead th.mhp-detail-col--comment { width: 30%; }

.mhp-archiv-personal-detail-table td.mhp-cell--num {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.mhp-archiv-personal-note-preview {
    display: block;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

/* --- Haushaltsanalyse / AdminInsights: Chart-Panel-Isolation --------------------------------
   Root cause der "blauen vertikalen Linien": MudChart 9.x setzt auf seinen Innen-SVGs (Line/Bar)
   "overflow: unset" - dadurch koennen Y-Achsen-Gitterlinien (YAxisLines defaultet auf true) und
   primary-blaue Serienlinien optisch ueber den Panel-Rand hinaus in Nachbar-Panels reichen.
   Loesung: jedes Chart-Panel bekommt einen eigenen Stacking-Context und clipt SVG-Overflow.
   Die Reset-Regel ueberschreibt explizit Mud's Default "overflow: unset" auf den Innen-Charts. */
.mhp-insights-chart-panel {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-width: 0;
}

.mhp-insights-chart-panel .mud-chart {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.mhp-insights-chart-panel .mud-chart .mud-chart-line,
.mhp-insights-chart-panel .mud-chart .mud-chart-bar,
.mhp-insights-chart-panel .mud-chart .mud-chart-pie,
.mhp-insights-chart-panel .mud-chart .mud-chart-donut {
    overflow: hidden !important;
    max-width: 100%;
}

.mhp-insights-chart-panel .mud-chart svg {
    max-width: 100%;
    overflow: hidden;
}

/* MudGrid-Kinder muessen schrumpfen koennen, sonst sprengt das fixed-aspect-ratio SVG die Spalte. */
.mhp-insights-charts-grid > .mud-grid-item {
    min-width: 0;
}

.mhp-insights-empty-chart {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    padding: 1rem;
    border-radius: 12px;
    border: 1px dashed var(--mhp-border);
    color: var(--mhp-muted);
    background: rgba(248, 250, 252, 0.6);
    text-align: center;
}

.mhp-settings-stack {
    max-width: 36rem;
}

.mhp-text-btn-strong.mud-button-root {
    min-width: 0;
    font-weight: 600;
}

.mhp-confirm-dialog .mud-dialog-content {
    padding: 1rem 1.25rem 0.5rem;
}

.mhp-confirm-dialog .mud-dialog-actions {
    padding: 0.5rem 0.75rem 0.75rem;
}

/* Mein Haushalt / INV: Hinweis-Kacheln (vorher lokales style-Element in MeinHaushalt.razor) */
.mhp-mh-info-cluster {
    border-radius: 12px;
}

.mhp-mh-hint-tile {
    border-radius: 10px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--mhp-border);
    background-color: var(--mhp-surface);
}

.mhp-mh-hint-tile-accent {
    border-color: rgba(37, 99, 235, 0.35);
    background-color: var(--mhp-primary-soft);
}

.mhp-mh-hint-tile-warning {
    border-color: rgba(245, 158, 11, 0.45);
    background-color: #fffbeb;
}

.mhp-mh-hint-text {
    line-height: 1.45;
}

.mhp-mh-alert-critical {
    border-radius: 10px;
}

.mhp-mh-rubrics-panel {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.06) 0%, rgba(255, 255, 255, 0) 100%);
}

.mhp-mh-rubrics-tabs .mud-tab {
    font-weight: 600;
}

/* --- Mein Haushalt / INV (+ gleiche Arbeitslisten): Referenz-Feinpolitur --- */

/* Nur HH-/INV-Start: großzügigerer Seitenkopf (SectionPage) */
.mhp-page:has(.mhp-mh-primary-worklist) .mhp-page-header {
    padding: 1.35rem 1.5rem 1.45rem !important;
    margin-bottom: 1.25rem !important;
}

.mhp-page:has(.mhp-mh-primary-worklist) .mhp-page-title {
    font-size: clamp(1.55rem, 2.3vw, 2rem) !important;
    font-weight: 650 !important;
    letter-spacing: -0.025em !important;
    line-height: 1.2 !important;
}

.mhp-page:has(.mhp-mh-primary-worklist) .mhp-page-description {
    margin-top: 0.4rem !important;
    line-height: 1.55 !important;
    font-size: 0.95rem !important;
    max-width: 78ch !important;
}

.mhp-page:has(.mhp-mh-primary-worklist) .mhp-page-content {
    padding-top: 1.1rem !important;
    padding-bottom: 0.25rem !important;
}

/* Rubrik-KPI-Karten (Mein Haushalt / Investiv — kein MudTabs) */
.mhp-mh-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
}

@media (max-width: 959.98px) {
    .mhp-mh-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.mhp-mh-kpi-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    padding: 14px 14px 13px;
    width: 100%;
    min-height: 5.5rem;
    text-align: left;
    font: inherit;
    cursor: pointer;
    color: var(--mhp-text);
    border: 1px solid var(--mhp-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.045);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.12s ease;
}

.mhp-mh-kpi-card:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.55);
    outline-offset: 2px;
}

.mhp-mh-kpi-card:hover {
    border-color: rgba(37, 99, 235, 0.22);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.07);
}

.mhp-mh-kpi-card--active {
    border-color: rgba(37, 99, 235, 0.42) !important;
    background: linear-gradient(165deg, var(--mhp-primary-soft) 0%, #fff 62%) !important;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.1), 0 10px 28px rgba(37, 99, 235, 0.1) !important;
    transform: translateY(-1px);
}

.mhp-mh-kpi-card__icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.12);
    color: var(--mhp-muted);
}

.mhp-mh-kpi-card--active .mhp-mh-kpi-card__icon {
    background: rgba(37, 99, 235, 0.12);
    color: var(--mhp-primary);
}

.mhp-mh-kpi-card--tone-action:not(.mhp-mh-kpi-card--active) .mhp-mh-kpi-card__icon {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
}

.mhp-mh-kpi-card--tone-saved:not(.mhp-mh-kpi-card--active) .mhp-mh-kpi-card__icon {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
}

.mhp-mh-kpi-card--tone-flow:not(.mhp-mh-kpi-card--active) .mhp-mh-kpi-card__icon {
    background: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
}

.mhp-mh-kpi-card--tone-all:not(.mhp-mh-kpi-card--active) .mhp-mh-kpi-card__icon {
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
}

.mhp-mh-kpi-card__body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.mhp-mh-kpi-card__value {
    font-size: clamp(1.55rem, 2.4vw, 1.95rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--mhp-primary-dark);
}

.mhp-mh-kpi-card--active .mhp-mh-kpi-card__value {
    color: var(--mhp-primary);
}

.mhp-mh-kpi-card__label {
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--mhp-muted);
    max-width: 100%;
}

.mhp-mh-kpi-card--active .mhp-mh-kpi-card__label {
    color: rgba(37, 99, 235, 0.85);
}

/* Rubrik-/KPI-Leiste: Karten statt „klassische“ Tabs */
.mhp-mh-rubrics-panel.mhp-table-panel {
    background: var(--mhp-bg) !important;
    border: 1px solid var(--mhp-border) !important;
    border-radius: 14px !important;
    box-shadow: var(--mhp-shadow-soft) !important;
}

.mhp-mh-rubrics-panel.mhp-table-panel:not(.mhp-mh-kpi-strip-panel) {
    padding: 12px 12px 10px !important;
}

.mhp-mh-kpi-strip-panel.mhp-table-panel {
    padding: 14px 14px 12px !important;
}

.mhp-mh-rubrics-tabs.mud-tabs {
    min-height: 0;
}

.mhp-mh-rubrics-tabs .mud-tabs-toolbar,
.mhp-mh-rubrics-tabs .mud-tabs-tabbar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    background: transparent !important;
    border-bottom: none !important;
    padding: 0 !important;
    min-height: 0 !important;
}

.mhp-mh-rubrics-tabs .mud-tab-slider {
    display: none !important;
}

.mhp-mh-rubrics-tabs .mud-tab {
    flex: 1 1 calc(25% - 10px);
    min-width: 9.5rem;
    min-height: 4.35rem !important;
    margin: 0 !important;
    padding: 10px 12px !important;
    border-radius: 12px !important;
    border: 1px solid var(--mhp-border) !important;
    background: #fff !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
    font-weight: 600 !important;
    font-size: 0.8125rem !important;
    line-height: 1.35 !important;
    color: var(--mhp-text) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    justify-content: center !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.mhp-mh-rubrics-tabs .mud-tab:hover {
    border-color: rgba(37, 99, 235, 0.28) !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06) !important;
}

.mhp-mh-rubrics-tabs .mud-tab.mud-tab-active {
    border-color: rgba(37, 99, 235, 0.45) !important;
    background: linear-gradient(180deg, var(--mhp-primary-soft) 0%, #fff 100%) !important;
    color: var(--mhp-primary) !important;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.12), 0 6px 18px rgba(37, 99, 235, 0.08) !important;
}

@media (max-width: 959.98px) {
    .mhp-mh-rubrics-tabs .mud-tab {
        flex: 1 1 calc(50% - 8px);
    }
}

/* Suchzeile + Toolbar: weiche Fläche wie Referenz-Karte */
.mhp-mh-search-well {
    align-items: stretch;
    gap: 10px 12px !important;
    padding: 12px 14px;
    background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
    border: 1px solid var(--mhp-border);
    border-radius: 14px;
    box-shadow: var(--mhp-shadow-soft);
}

.mhp-mh-search-well .mud-input-control {
    margin-bottom: 0;
}

.mhp-mh-search-well .mud-input-outlined .mud-input-outlined-border {
    border-radius: 11px;
}

.mhp-mh-search-well .mud-input-outlined:not(.mud-input-error) .mud-input-outlined-border {
    border-color: rgba(148, 163, 184, 0.45);
}

.mhp-mh-search-well .mud-input-outlined:hover:not(.mud-input-error) .mud-input-outlined-border {
    border-color: rgba(37, 99, 235, 0.28);
}

.mhp-mh-search-well .mud-input-root {
    background: rgba(255, 255, 255, 0.92);
}

.mhp-mh-search-well .mud-button-outlined {
    border-radius: 11px;
    font-weight: 500;
    min-height: 40px;
    padding-left: 1rem;
    padding-right: 1rem;
    border-color: rgba(148, 163, 184, 0.45);
    background: #fff;
}

.mhp-mh-toolbar-well {
    padding: 10px 4px 2px;
    border-bottom: 1px solid transparent;
}

.mhp-mh-toolbar-well .mud-switch {
    margin-left: 0;
    margin-right: 0;
}

.mhp-mh-toolbar-well.mhp-unified-top-toolbar .mhp-unified-top-toolbar__actions {
    gap: 0.25rem 1.15rem;
    align-items: center;
}

.mhp-mh-toolbar-well .mud-typography {
    color: var(--mhp-muted);
}

/* Bulk-Band */
.mhp-mh-selection-bar.mhp-unified-selection-bar {
    background: #fafbfc !important;
    border: 1px solid var(--mhp-border) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    padding: 12px 14px !important;
}

.mhp-mh-selection-bar .mud-chip {
    font-weight: 500;
}

/* Hinweise / Info-Cluster */
.mhp-mh-info-cluster {
    border: 1px solid var(--mhp-border) !important;
    box-shadow: var(--mhp-shadow-soft) !important;
    background: linear-gradient(180deg, #fff 0%, #fafbfc 100%) !important;
}

.mhp-mh-hint-tile {
    padding: 0.9rem 1.1rem;
    box-shadow: none;
    background: #fff;
}

.mhp-mh-hint-tile-accent {
    background: linear-gradient(180deg, var(--mhp-primary-soft) 0%, #fff 100%) !important;
}

.mhp-mh-hint-tile-warning {
    background: linear-gradient(180deg, #fffbeb 0%, #fff 100%) !important;
}

.mhp-mh-hints-stack {
    gap: 14px !important;
}

.mhp-mh-info-cluster .mud-card-header {
    padding-bottom: 0.5rem !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    margin-bottom: 0.35rem;
}

.mhp-mh-info-cluster .mud-card-content {
    padding-top: 0.35rem !important;
}

.mhp-mh-hint-tile:not(.mhp-mh-hint-tile-warning):not(.mhp-mh-hint-tile-accent) {
    border-left: 3px solid rgba(37, 99, 235, 0.38);
}

.mhp-mh-hint-tile-accent {
    border-left: 3px solid rgba(37, 99, 235, 0.55) !important;
}

.mhp-mh-hint-tile-warning {
    border-left: 3px solid rgba(217, 119, 6, 0.72) !important;
}

.mhp-mh-worklist-page-alert.mud-alert {
    border-radius: 12px;
    box-shadow: var(--mhp-shadow-soft);
}

/* Kontext-Hinweis: kompakt unter KPI/Filter, nur bei Bedarf sichtbar */
.mhp-table-context-hint {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border-radius: 12px;
    padding: 8px 10px;
    margin-bottom: 10px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.mhp-table-context-hint__icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.mhp-table-context-hint__body {
    flex: 1;
    min-width: 0;
}

.mhp-table-context-hint__title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #12307a;
    line-height: 1.25;
}

.mhp-table-context-hint__text {
    font-size: 0.82rem;
    color: #475569;
    line-height: 1.4;
    margin-top: 2px;
    white-space: pre-line;
}

.mhp-table-context-hint__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.mhp-table-context-hint__chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(15, 23, 42, 0.05);
    color: #475569;
}

.mhp-table-context-hint__close {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: #64748b;
    border-radius: 8px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mhp-table-context-hint__close:hover,
.mhp-table-context-hint__close:focus-visible {
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
}

.mhp-table-context-hint--success {
    border-color: rgba(22, 163, 74, 0.22);
    background: linear-gradient(180deg, #ffffff 0%, #f6fff9 100%);
}

.mhp-table-context-hint--success .mhp-table-context-hint__icon {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
}

.mhp-table-context-hint--warning,
.mhp-table-context-hint--required,
.mhp-table-context-hint--deadline {
    border-color: rgba(217, 119, 6, 0.24);
    background: linear-gradient(180deg, #ffffff 0%, #fffaf3 100%);
}

.mhp-table-context-hint--warning .mhp-table-context-hint__icon,
.mhp-table-context-hint--required .mhp-table-context-hint__icon,
.mhp-table-context-hint--deadline .mhp-table-context-hint__icon {
    background: rgba(217, 119, 6, 0.12);
    color: #b45309;
}

.mhp-table-context-hint--locked {
    border-color: rgba(100, 116, 139, 0.24);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.mhp-table-context-hint--locked .mhp-table-context-hint__icon {
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
}

.mhp-table-hints-show-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .mhp-table-context-hint {
        flex-wrap: wrap;
    }

    .mhp-table-context-hint__close {
        margin-left: auto;
    }
}

/* Kompakter Arbeitsstatus-Bereich oberhalb von Tabellen */
.mhp-table-hints,
.mhp-table-hint-summary {
    border: 1px solid rgba(37, 99, 235, 0.14);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border-radius: 18px;
    padding: 12px 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
    margin-bottom: 14px;
}

.mhp-table-hint-summary__main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.mhp-table-hint-summary__title-block {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
    margin-right: auto;
}

.mhp-table-hint-summary__icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.mhp-table-hint-summary__eyebrow {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    font-weight: 700;
    line-height: 1.2;
}

.mhp-table-hint-summary__title {
    font-size: 1rem;
    font-weight: 800;
    color: #12307a;
    line-height: 1.25;
}

.mhp-table-hint-summary__count {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(15, 23, 42, 0.04);
    color: #475569;
    font-size: 0.82rem;
    font-weight: 800;
}

.mhp-table-hint-summary__chips {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.mhp-table-hint-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid transparent;
    line-height: 1.2;
}

.mhp-table-hint-summary__toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #1d4ed8;
    cursor: pointer;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 800;
    padding: 7px 10px;
}

.mhp-table-hint-summary__toggle:hover,
.mhp-table-hint-summary__toggle:focus-visible {
    background: rgba(37, 99, 235, 0.08);
    outline: none;
}

.mhp-table-hint-summary__details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.mhp-table-hint-detail {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.mhp-table-hint-detail__icon {
    width: 32px;
    height: 32px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mhp-table-hint-detail__title {
    font-weight: 800;
    color: #12307a;
    margin-bottom: 2px;
    line-height: 1.25;
}

.mhp-table-hint-detail__text {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.35;
}

.mhp-table-hint-detail__action {
    width: fit-content;
}

.mhp-table-hint-chip--info {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.18);
    color: #1d4ed8;
}

.mhp-table-hint-chip--success {
    background: rgba(22, 163, 74, 0.08);
    border-color: rgba(22, 163, 74, 0.18);
    color: #15803d;
}

.mhp-table-hint-chip--warning {
    background: rgba(217, 119, 6, 0.08);
    border-color: rgba(217, 119, 6, 0.2);
    color: #b45309;
}

.mhp-table-hint-chip--required {
    background: rgba(220, 38, 38, 0.07);
    border-color: rgba(220, 38, 38, 0.18);
    color: #b91c1c;
}

.mhp-table-hint-chip--locked {
    background: rgba(100, 116, 139, 0.09);
    border-color: rgba(100, 116, 139, 0.2);
    color: #475569;
}

.mhp-table-hint-chip--deadline {
    background: rgba(79, 70, 229, 0.08);
    border-color: rgba(79, 70, 229, 0.18);
    color: #4338ca;
}

.mhp-table-hint-detail--info .mhp-table-hint-detail__icon {
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
}

.mhp-table-hint-detail--success .mhp-table-hint-detail__icon {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
}

.mhp-table-hint-detail--warning .mhp-table-hint-detail__icon {
    background: rgba(217, 119, 6, 0.12);
    color: #b45309;
}

.mhp-table-hint-detail--required .mhp-table-hint-detail__icon {
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
}

.mhp-table-hint-detail--locked .mhp-table-hint-detail__icon {
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
}

.mhp-table-hint-detail--deadline .mhp-table-hint-detail__icon {
    background: rgba(79, 70, 229, 0.1);
    color: #4338ca;
}

@media (max-width: 640px) {
    .mhp-table-hint-summary__main {
        align-items: flex-start;
    }

    .mhp-table-hint-summary__title-block,
    .mhp-table-hint-summary__chips,
    .mhp-table-hint-summary__toggle {
        width: 100%;
    }

    .mhp-table-hint-summary__chips {
        gap: 6px;
    }

    .mhp-table-hint-summary__toggle {
        justify-content: center;
    }

    .mhp-table-hint-summary__details {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Tabellenrahmen HH/INV (+ gleiche Klasse auf Bewirtschaftung) */
.mhp-mh-table-wrap.mhp-unified-table-wrap {
    border: 1px solid var(--mhp-border);
    border-radius: 12px;
    box-shadow: var(--mhp-shadow-soft);
    background: #fff;
}

.mhp-mh-data-table .mud-table-head .mud-table-cell,
.mhp-mh-data-table .mud-table-head .mud-table-cell .mud-table-cell-content {
    background: linear-gradient(180deg, #eef2f7 0%, #e8edf3 100%) !important;
    color: var(--mhp-primary-dark) !important;
    font-weight: 650 !important;
    font-size: 0.78rem !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(148, 163, 184, 0.45) !important;
    padding-top: 13px !important;
    padding-bottom: 13px !important;
}

.mhp-mh-data-table .mud-table-body .mud-table-cell {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    font-size: 0.875rem;
}

.mhp-mh-data-table .mud-table-head .mud-table-row .mud-table-cell:first-child,
.mhp-mh-data-table .mud-table-body .mud-table-row .mud-table-cell:first-child {
    width: 3rem;
    min-width: 3rem;
    max-width: 3.25rem;
    text-align: center;
    padding-inline: 6px !important;
}

.mhp-mh-data-table .mud-table-head .mud-table-row .mud-table-cell:first-child .mud-button-root,
.mhp-mh-data-table .mud-table-body .mud-table-row .mud-table-cell:first-child .mud-button-root {
    padding: 4px;
    min-width: 0;
}

.mhp-mh-data-table .mhp-col-status .mud-chip {
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.03em;
    box-shadow: none !important;
    border-radius: 999px !important;
    padding-inline: 10px;
    min-height: 26px;
}

.mhp-mh-data-table .mud-table-body .mud-table-row:hover .mud-table-cell {
    background: rgba(37, 99, 235, 0.035) !important;
}

.mhp-mh-data-table .mud-table-body > tr.mud-table-row-selected > .mud-table-cell {
    background: rgba(37, 99, 235, 0.065) !important;
}

.mhp-mh-data-table .mhp-unified-col-actions,
.mhp-mh-data-table .mhp-unified-actions-cell {
    background-clip: padding-box;
}

.mhp-mh-data-table thead > tr > th.mhp-unified-col-actions {
    box-shadow: -4px 0 12px rgba(15, 23, 42, 0.04) !important;
    background: linear-gradient(180deg, #e8edf3 0%, #e2e8f0 100%) !important;
    font-weight: 600 !important;
}

.mhp-mh-data-table tbody > tr > td.mhp-unified-col-actions {
    box-shadow: -4px 0 12px rgba(15, 23, 42, 0.03) !important;
    background: rgba(252, 252, 253, 0.98) !important;
}

.mhp-mh-data-table .mhp-unified-col-actions .mud-button-root,
.mhp-mh-data-table .mhp-unified-actions-cell .mud-button-root {
    border-radius: 10px;
}

.mhp-table-panel {
    border: 1px solid var(--mhp-border);
    background: #ffffff;
    box-shadow: var(--mhp-shadow-soft);
}

.mhp-row-editable {
    background-color: rgba(99, 113, 126, 0.03);
}

.mhp-row-editable > td:first-child {
    border-left: 3px solid rgba(99, 113, 126, 0.45);
}

/* Aktionen-Spalte: sicher oberhalb benachbarter Controls (z. B. breite NumericFields), damit Klicks zuverlaessig den Button treffen. */
.mhp-mein-haushalt-actions {
    position: relative;
    z-index: 0;
}

.mhp-kpi-card {
    height: 100%;
    border: 1px solid rgba(215, 227, 241, 0.8);
    box-shadow: var(--mhp-shadow-soft);
}

.mhp-empty-state {
    padding: 12px;
    border-radius: 10px;
    border: 1px dashed var(--mhp-border);
    color: var(--mhp-muted);
    background: #fbfdff;
}

.mhp-status-chip {
    font-weight: 500;
    border: 1px solid rgba(23, 58, 96, 0.16);
}

.mud-paper,
.mud-card {
    border: 1px solid rgba(215, 227, 241, 0.75);
    box-shadow: var(--mhp-shadow-soft);
}

.mud-table-container {
    border-radius: 10px;
    border: 1px solid rgba(215, 227, 241, 0.75);
    background-color: #fff;
}

.mud-button-root {
    border-radius: 9px;
    text-transform: none;
    min-height: 36px;
    padding-inline: 12px;
    font-weight: 500;
    letter-spacing: 0;
}

.mud-chip {
    border-radius: 999px;
    font-weight: 500;
    min-height: 26px;
}

/* AppBar: Zeile mit Abgabe links, Aktionen rechts */
.mhp-appbar-toolbar-row {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    gap: 10px;
    flex: 1 1 auto;
}

/* Kein Abgabe-Status: Leading kollabiert (kein Freiraum links). */
.mhp-appbar-leading {
    flex: 0 0 0;
    min-width: 0;
    max-width: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.mhp-appbar-toolbar-row:has(.mhp-submission-toolbar-wrap) .mhp-appbar-leading {
    flex: 1 1 auto;
    min-width: min(390px, 100%);
    max-width: min(840px, min(72vw, calc(100% - 330px)));
    overflow: visible;
}

/* Abgabe-Status: linke Status-Kapsel (nicht kleines Eck-Badge) */
.mhp-submission-toolbar-wrap {
    width: 100%;
    min-width: 380px;
}

.mhp-submission-toolbar-bar {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 0 18px;
    text-transform: none;
    letter-spacing: 0;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    width: 100%;
    max-width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.45);
    justify-content: flex-start;
    background-color: rgba(248, 250, 252, 0.92);
    cursor: default;
    user-select: text;
}

.mhp-submission-toolbar-bar__inner {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    flex: 1 1 auto;
    gap: 0.35rem;
    font-size: 0.95rem;
    line-height: 1.2;
}

.mhp-submission-toolbar-bar--info {
    border-color: rgba(37, 99, 235, 0.34);
    color: #1D4ED8;
}

.mhp-submission-toolbar-bar--warning {
    border-color: rgba(245, 158, 11, 0.38);
    color: #92400E;
    background-color: rgba(255, 251, 235, 0.88);
}

.mhp-submission-toolbar-bar--error {
    border-color: rgba(239, 68, 68, 0.38);
    color: #B91C1C;
    background-color: rgba(254, 242, 242, 0.88);
}

.mhp-submission-toolbar-bar--default {
    color: #334155;
}

.mhp-submission-toolbar-bar__year {
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    font-weight: 700;
}

.mhp-submission-toolbar-bar__sep {
    flex-shrink: 0;
    opacity: 0.45;
    padding-inline: 0.02rem;
}

.mhp-submission-toolbar-bar__status {
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 700;
}

.mhp-submission-toolbar-bar__deadline {
    min-width: 0;
    font-variant-numeric: tabular-nums;
    opacity: 0.88;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mhp-appbar-actions {
    min-width: 0;
    max-width: min(58vw, 540px);
    /* Wichtig: kein overflow:hidden – sonst wird das MudBadge (TopRight) oben abgeschnitten.
       Horizontale Begrenzung übernimmt .global-scope-indicator (ellipsis). */
    overflow: visible !important;
    align-items: center;
    /* Vertikaler Puffer: Badge (Origin TopRight) sitzt über der Icon-Mitte */
    padding-top: 4px;
    padding-bottom: 2px;
    box-sizing: border-box;
}

/* Glocke: Badge-Root darf nicht clippen (Mud intern teils overflow:hidden) */
.mhp-notification-bell.mud-badge,
.mhp-notification-bell .mud-badge-wrapper {
    overflow: visible !important;
}

.mhp-notification-bell.mud-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Screenreader-only (z. B. „Ungelesen“ neben Lead-Dot) */
.mhp-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Glocke: Badge ruhig, gut lesbar, tabellarische Ziffern */
.mhp-notification-bell .mud-badge.mhp-notification-bell__badge,
.mhp-notification-bell .mud-badge-badge {
    position: absolute !important;
    top: 7px !important;
    right: 1px !important;
    transform: translate(52%, -30%) !important;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    min-width: 24px;
    height: 24px;
    width: auto;
    max-width: none;
    line-height: 1;
    font-size: 0.73rem;
    padding: 0 7px;
    white-space: nowrap;
    border-radius: 999px;
    box-sizing: border-box;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    z-index: 3;
    box-shadow: 0 1px 6px rgba(180, 40, 40, 0.28) !important;
    border: 2px solid #fff !important;
    background-color: #c62828 !important;
    color: #fff !important;
}

.mhp-notification-bell-wrap {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    overflow: visible;
    /* Padding oben/rechts: ausreichend für TopRight-Badge + weißen Rand (Bordered), Toolbar clip vermeiden */
    padding: 9px 12px 4px 4px;
    margin: 0 -2px 0 0;
    border-radius: 12px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.mhp-notification-bell-wrap--pulse {
    animation: mhp-bell-pulse 0.85s ease-out 2;
}

@keyframes mhp-bell-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(25, 118, 210, 0.45);
        transform: scale(1);
    }
    40% {
        box-shadow: 0 0 0 10px rgba(25, 118, 210, 0);
        transform: scale(1.04);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(25, 118, 210, 0);
        transform: scale(1);
    }
}

/* Glocke-Trigger: ruhiger „Button“, klarer Fokus, kein Layout-Sprung */
.mhp-notification-menu-trigger.mud-button-root {
    color: var(--mhp-primary-dark) !important;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 12px;
    min-width: 44px;
    min-height: 44px;
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.mhp-notification-menu-trigger.mud-button-root .mud-icon-root {
    font-size: 1.5rem !important;
    opacity: 0.92;
}

.mhp-notification-menu-trigger.mud-button-root:hover {
    background-color: rgba(15, 53, 94, 0.07);
    border-color: rgba(15, 53, 94, 0.1);
}

.mhp-notification-menu-trigger.mud-button-root:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}

.mhp-notification-menu-popover .mud-popover-open {
    box-shadow: 0 16px 48px rgba(15, 35, 60, 0.14);
    border-radius: 14px;
    overflow: visible;
}

.mhp-notification-panel-root {
    outline: none;
}

.mhp-notification-panel {
    width: min(100vw - 24px, 440px);
    max-height: min(78vh, 580px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 14px !important;
    border: 1px solid rgba(15, 53, 94, 0.1);
    background: #fff;
    box-shadow: 0 14px 40px rgba(15, 35, 60, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
}

.mhp-notification-panel__header {
    flex-shrink: 0;
    background: #f3f5f8;
    border-bottom: 1px solid rgba(15, 53, 94, 0.08);
}

.mhp-notification-panel__brand {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px 10px;
}

.mhp-notification-panel__brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(15, 53, 94, 0.07);
    color: var(--mhp-primary-dark);
    border: 1px solid rgba(15, 53, 94, 0.07);
}

.mhp-notification-panel__brand-icon .mud-icon-root {
    font-size: 1.35rem !important;
}

.mhp-notification-panel__title {
    font-weight: 600 !important;
    letter-spacing: -0.015em;
    font-size: 1.02rem !important;
    line-height: 1.28 !important;
    color: var(--mhp-primary-dark);
}

.mhp-notification-panel__subtitle {
    opacity: 0.72;
    line-height: 1.45;
    color: var(--mud-palette-text-secondary);
    font-size: 0.8125rem !important;
}

.mhp-notification-panel__count-chip {
    font-weight: 600 !important;
    letter-spacing: 0;
    border-width: 1.5px !important;
}

.mhp-notification-panel__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 12px;
    padding: 10px 12px 12px;
    background: #f7f8fb;
    border-top: 1px solid rgba(15, 53, 94, 0.05);
}

.mhp-notification-panel__toggle-group.mud-button-group-root {
    border-radius: 10px !important;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 35, 60, 0.05);
}

.mhp-notification-panel__toolbar-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.mhp-notification-panel__toolbar-divider {
    align-self: stretch;
    min-height: 28px;
    border-color: rgba(15, 53, 94, 0.12) !important;
}

.mhp-notification-filter-btn {
    text-transform: none !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    min-width: 0;
}

.mhp-notification-panel__link-btn .mud-button-label {
    font-weight: 500;
    font-size: 0.8rem;
}

.mhp-notification-panel__link-btn--primary .mud-button-label {
    font-weight: 600;
}

.mhp-notification-panel__divider {
    margin: 0 !important;
}

.mhp-notification-panel__progress {
    margin: 0 !important;
    border-radius: 0 !important;
}

.mhp-notification-panel__scroll {
    flex: 1 1 auto;
    min-height: 128px;
    max-height: 420px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    background: #f9fafc;
    scrollbar-gutter: stable;
}

.mhp-notification-card-list.mud-stack {
    padding: 2px 4px 4px !important;
}

.mhp-notification-panel__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 28px 20px 32px;
    gap: 10px;
    margin: 12px 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(15, 53, 94, 0.09);
    background: #fff;
    box-shadow: 0 1px 0 rgba(15, 53, 94, 0.04);
}

.mhp-notification-panel__empty-icon {
    font-size: 2.75rem !important;
    opacity: 0.22;
    color: var(--mhp-primary-dark);
}

.mhp-notification-panel__empty-title {
    font-weight: 600 !important;
    color: var(--mhp-primary-dark);
}

.mhp-notification-panel__empty-hint {
    max-width: 300px;
    opacity: 0.7;
    line-height: 1.5;
    font-size: 0.8125rem !important;
}

/* Karten: linker Typ-Streifen, Titel zuerst, ruhige Flächen */
.mhp-notification-card {
    --mhp-notif-stripe: rgba(15, 53, 94, 0.18);
    position: relative;
    border-radius: 10px;
    padding: 12px 14px 12px 15px;
    border: 1px solid rgba(15, 53, 94, 0.07);
    border-left: 3px solid var(--mhp-notif-stripe);
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    background: #fff;
}

.mhp-notification-card--kind-approved {
    --mhp-notif-stripe: var(--mud-palette-success);
}

.mhp-notification-card--kind-rejected {
    --mhp-notif-stripe: var(--mud-palette-error);
}

.mhp-notification-card--kind-assigned {
    --mhp-notif-stripe: var(--mud-palette-primary);
}

.mhp-notification-card--kind-workflow {
    --mhp-notif-stripe: var(--mud-palette-info);
}

.mhp-notification-card--kind-reminder {
    --mhp-notif-stripe: var(--mud-palette-warning);
}

.mhp-notification-card--kind-escalation {
    --mhp-notif-stripe: var(--mud-palette-error);
}

.mhp-notification-card--kind-system {
    --mhp-notif-stripe: var(--mud-palette-secondary);
}

.mhp-notification-card--kind-audit {
    --mhp-notif-stripe: var(--mud-palette-dark);
}

.mhp-notification-card:focus-visible {
    outline: 2px solid rgba(25, 118, 210, 0.45);
    outline-offset: 2px;
}

.mhp-notification-card--unread {
    border-left-width: 4px;
    background: linear-gradient(102deg, rgba(25, 118, 210, 0.065) 0%, #fff 40%, #fff 100%);
    border-color: rgba(25, 118, 210, 0.14);
    box-shadow: 0 1px 0 rgba(25, 118, 210, 0.06);
}

.mhp-notification-card--read {
    background: #fafbfc;
    opacity: 1;
}

.mhp-notification-card--read .mhp-notification-card__title {
    font-weight: 500 !important;
    color: rgba(0, 0, 0, 0.76);
}

.mhp-notification-card:hover {
    border-color: rgba(15, 53, 94, 0.14);
    background-color: #fff;
    box-shadow: 0 4px 16px rgba(15, 35, 60, 0.07);
}

.mhp-notification-card--read:hover {
    background-color: #fff;
}

.mhp-notification-card:active {
    box-shadow: 0 1px 4px rgba(15, 35, 60, 0.06);
}

.mhp-notification-card--unread .mhp-notification-card__title {
    font-weight: 600 !important;
    color: var(--mud-palette-text-primary);
}

.mhp-notification-card__title-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

.mhp-notification-card__lead-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    margin-top: 7px;
    border-radius: 50%;
    background: var(--mud-palette-primary);
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

.mhp-notification-card__meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(15, 53, 94, 0.06);
    min-width: 0;
}

.mhp-notification-card__icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mhp-notification-card__icon {
    font-size: 1.28rem !important;
}

.mhp-notification-card__icon-wrap--success {
    background: rgba(46, 125, 50, 0.085);
    color: var(--mud-palette-success);
}

.mhp-notification-card__icon-wrap--error {
    background: rgba(211, 47, 47, 0.075);
    color: var(--mud-palette-error);
}

.mhp-notification-card__icon-wrap--primary {
    background: rgba(25, 118, 210, 0.085);
    color: var(--mud-palette-primary);
}

.mhp-notification-card__icon-wrap--info {
    background: rgba(2, 136, 209, 0.075);
    color: var(--mud-palette-info);
}

.mhp-notification-card__icon-wrap--warning {
    background: rgba(237, 108, 2, 0.085);
    color: var(--mud-palette-warning);
}

.mhp-notification-card__icon-wrap--secondary {
    background: rgba(92, 107, 192, 0.075);
    color: var(--mud-palette-secondary);
}

.mhp-notification-card__icon-wrap--dark {
    background: rgba(55, 71, 89, 0.085);
    color: var(--mud-palette-dark);
}

.mhp-notification-card__icon-wrap--default {
    background: rgba(0, 0, 0, 0.045);
    color: var(--mud-palette-text-primary);
}

.mhp-notification-type-chip {
    max-width: 158px;
    font-weight: 600 !important;
    font-size: 0.7rem !important;
    letter-spacing: 0.01em;
    text-transform: none;
}

.mhp-notification-card__title,
.mhp-notification-card__title.mud-typography {
    flex: 1;
    min-width: 0;
    font-weight: 500;
    line-height: 1.42 !important;
    letter-spacing: -0.01em;
    color: var(--mud-palette-text-primary);
}

.mhp-notification-card__message,
.mhp-notification-card__message.mud-typography {
    opacity: 0.74;
    max-width: 100%;
    line-height: 1.45 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mhp-notification-card__time {
    flex: 1;
    min-width: 0;
    opacity: 1;
    font-weight: 400;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 6px;
}

.mhp-notification-card__time-rel {
    font-weight: 600;
    color: rgba(0, 0, 0, 0.62);
    font-size: 0.75rem;
}

.mhp-notification-card__time-abs {
    font-weight: 400;
    color: rgba(0, 0, 0, 0.48);
    font-size: 0.7rem;
}

.mhp-notification-card__time-icon {
    opacity: 0.42;
    flex-shrink: 0;
}

.mhp-notification-card__chevron {
    opacity: 0.42;
    color: var(--mud-palette-primary);
    margin-left: auto;
    flex-shrink: 0;
}

/* In-App-Toast (unten rechts). Host liegt in MainLayout NEBEN MudLayout, damit fixed nicht von .mud-layout overflow/transform gefangen wird. */
.mhp-inapp-toast-anchor {
    position: fixed;
    right: 20px;
    bottom: 20px;
    left: auto;
    top: auto;
    /* Über MudDrawer-Overlay, Snackbar, Popover; unter modalem Vollbild-Dialog */
    z-index: 12000;
    max-width: min(400px, calc(100vw - 32px));
    min-width: min(320px, calc(100vw - 32px));
    width: max-content;
    pointer-events: none;
    opacity: 1 !important;
    visibility: visible !important;
}

.mhp-inapp-toast-anchor .mhp-inapp-toast {
    pointer-events: auto;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.mhp-inapp-toast {
    --mhp-notif-stripe: rgba(15, 53, 94, 0.22);
    position: relative;
    border-radius: 10px !important;
    border: 1px solid rgba(15, 53, 94, 0.18) !important;
    border-left: 4px solid var(--mhp-notif-stripe) !important;
    background: #ffffff !important;
    box-shadow:
        0 4px 6px rgba(15, 35, 60, 0.06),
        0 16px 40px rgba(15, 35, 60, 0.16) !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow: visible !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.mhp-inapp-toast__surface {
    position: relative;
    z-index: 1;
    cursor: pointer;
    border-radius: 10px;
    outline: none;
}

.mhp-inapp-toast__surface:focus-visible {
    outline: 2px solid rgba(25, 118, 210, 0.45);
    outline-offset: 2px;
}

.mhp-inapp-toast:hover {
    box-shadow: 0 12px 36px rgba(15, 35, 60, 0.14) !important;
}

.mhp-inapp-toast.mhp-notification-card--kind-approved {
    --mhp-notif-stripe: var(--mud-palette-success);
}

.mhp-inapp-toast.mhp-notification-card--kind-rejected {
    --mhp-notif-stripe: var(--mud-palette-error);
}

.mhp-inapp-toast.mhp-notification-card--kind-assigned {
    --mhp-notif-stripe: var(--mud-palette-primary);
}

.mhp-inapp-toast.mhp-notification-card--kind-workflow {
    --mhp-notif-stripe: var(--mud-palette-info);
}

.mhp-inapp-toast.mhp-notification-card--kind-reminder {
    --mhp-notif-stripe: var(--mud-palette-warning);
}

.mhp-inapp-toast.mhp-notification-card--kind-escalation {
    --mhp-notif-stripe: var(--mud-palette-error);
}

.mhp-inapp-toast.mhp-notification-card--kind-system {
    --mhp-notif-stripe: var(--mud-palette-secondary);
}

.mhp-inapp-toast.mhp-notification-card--kind-audit {
    --mhp-notif-stripe: var(--mud-palette-dark);
}

.mhp-inapp-toast__inner {
    display: flex;
    gap: 12px;
    padding: 12px 40px 10px 14px;
    align-items: flex-start;
}

.mhp-inapp-toast__icon-wrap {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 53, 94, 0.06);
}

.mhp-inapp-toast__icon {
    font-size: 22px !important;
}

.mhp-inapp-toast__icon-wrap--success {
    background: rgba(46, 154, 73, 0.12);
    color: var(--mud-palette-success);
}

.mhp-inapp-toast__icon-wrap--error {
    background: rgba(198, 59, 59, 0.1);
    color: var(--mud-palette-error);
}

.mhp-inapp-toast__icon-wrap--primary {
    background: rgba(0, 87, 163, 0.1);
    color: var(--mud-palette-primary);
}

.mhp-inapp-toast__icon-wrap--info {
    background: rgba(10, 111, 182, 0.1);
    color: var(--mud-palette-info);
}

.mhp-inapp-toast__icon-wrap--warning {
    background: rgba(211, 154, 31, 0.12);
    color: var(--mud-palette-warning);
}

.mhp-inapp-toast__icon-wrap--secondary {
    background: rgba(90, 90, 90, 0.08);
    color: var(--mud-palette-secondary);
}

.mhp-inapp-toast__icon-wrap--dark {
    background: rgba(40, 40, 40, 0.08);
    color: var(--mud-palette-dark);
}

.mhp-inapp-toast__icon-wrap--default {
    background: rgba(15, 53, 94, 0.06);
    color: var(--mud-palette-text-secondary);
}

.mhp-inapp-toast__body {
    flex: 1;
    min-width: 0;
}

.mhp-inapp-toast__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 2px;
}

.mhp-inapp-toast__eyebrow {
    font-weight: 600 !important;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    opacity: 0.72;
}

.mhp-inapp-toast__close {
    margin: -6px -4px -6px 0 !important;
}

.mhp-inapp-toast__close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    pointer-events: auto;
}

.mhp-inapp-toast__close-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--mud-palette-text-primary);
}

.mhp-inapp-toast__close-btn:focus-visible {
    outline: 2px solid rgba(25, 118, 210, 0.45);
    outline-offset: 1px;
}

.mhp-inapp-toast__title {
    font-weight: 600 !important;
    line-height: 1.35 !important;
}

.mhp-inapp-toast__message {
    margin-top: 4px !important;
    opacity: 0.88;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mhp-inapp-toast__meta {
    margin-top: 8px !important;
    opacity: 0.75;
}

.mhp-inapp-toast__time-icon {
    opacity: 0.65;
    font-size: 14px !important;
}

.mhp-inapp-toast__time-abs {
    margin-left: 6px;
    opacity: 0.85;
}

.mhp-inapp-toast__hint {
    margin-top: 6px !important;
    opacity: 0.55;
    font-style: italic;
}

@media (max-width: 600px) {
    .mhp-inapp-toast-anchor {
        right: 12px;
        bottom: 12px;
        max-width: calc(100vw - 24px);
        min-width: min(280px, calc(100vw - 24px));
    }
}

.mhp-notification-table-row--unread td {
    background: linear-gradient(90deg, rgba(25, 118, 210, 0.06) 0%, transparent 55%) !important;
}

@media (max-width: 600px) {
    .mhp-notification-panel {
        width: min(100vw - 16px, 100%);
    }

    .mhp-notification-panel__scroll {
        max-height: min(50vh, 320px);
    }

    .mhp-notification-panel__toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .mhp-notification-panel__toolbar-actions {
        justify-content: space-between;
    }
}

.mhp-notif-center-time-main {
    font-weight: 600 !important;
}

.mhp-notif-center-time-sub {
    opacity: 0.72;
}

.mhp-notif-center-type-chip {
    font-weight: 600 !important;
    max-width: 160px;
}

.mhp-notif-center-title {
    line-height: 1.35 !important;
}

.mhp-notif-center-msg {
    opacity: 0.85;
}

.mhp-notif-center-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mud-palette-primary);
    flex-shrink: 0;
}

.mhp-notif-center-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 16px;
    gap: 8px;
}

.mhp-notif-center-empty-icon {
    font-size: 3rem !important;
    opacity: 0.35;
}

.mhp-notif-center-empty-title {
    font-weight: 600 !important;
}

.mhp-notif-center-empty-text {
    opacity: 0.8;
    max-width: 360px;
}

.mhp-note-editor {
    flex: 1 1 auto;
    min-height: 0;
}

.mhp-global-note-field textarea,
.mhp-global-note-field .mud-input-slot {
    min-height: 360px !important;
    max-height: 70vh;
    resize: vertical;
    overflow-y: auto;
}

.mhp-note-actions {
    margin-top: auto;
    padding-top: 4px;
}

.global-scope-indicator .mud-chip {
    background-color: rgba(15, 53, 94, 0.08) !important;
    color: var(--mhp-primary-dark) !important;
    border: 1px solid rgba(15, 53, 94, 0.16) !important;
    font-size: 0.78rem;
}

.mhp-page .mud-card .mud-card-content {
    padding: 14px 16px;
}

.mhp-page .mud-table {
    border-radius: 10px;
    overflow: hidden;
}

@media (max-width: 960px) {
    .mhp-appbar {
        min-height: 52px;
        padding-inline: 8px;
    }

    .mhp-brand {
        max-width: 52vw;
    }

    img.mhp-brand-logo {
        height: 42px;
        max-height: 44px;
        min-height: 40px;
        max-width: 150px;
    }

    .mhp-brand-subtitle {
        display: none;
    }

    .global-scope-indicator {
        max-width: 34vw;
    }

    .mhp-appbar-actions {
        max-width: 40vw;
    }

    .mhp-notification-bell-wrap {
        padding-top: 8px;
        padding-right: 12px;
    }

    .mhp-notification-bell .mud-badge.mhp-notification-bell__badge,
    .mhp-notification-bell .mud-badge-badge {
        top: 7px !important;
        transform: translate(52%, -24%) !important;
    }

    .mhp-nav-brand-inline {
        opacity: 0.72;
    }

    .mhp-appbar-toolbar-row:has(.mhp-submission-toolbar-wrap) .mhp-appbar-leading {
        max-width: min(660px, min(78vw, calc(100% - 250px)));
        min-width: min(340px, 66vw);
    }

    .mhp-submission-toolbar-wrap {
        min-width: min(340px, 66vw);
    }

    .mhp-submission-toolbar-bar {
        font-size: 0.87rem;
        min-height: 42px;
        padding-inline: 14px;
    }
}

@media (max-width: 600px) {
    .mhp-nav-brand-title {
        font-size: 0.64rem;
    }

    .mhp-brand-title {
        font-size: 0.86rem;
    }

    .global-scope-indicator {
        max-width: 30vw;
    }

    .mhp-appbar-actions {
        max-width: 34vw;
    }

    .mhp-notification-bell-wrap {
        padding-top: 7px;
        padding-right: 11px;
    }

    .mhp-notification-bell .mud-badge.mhp-notification-bell__badge,
    .mhp-notification-bell .mud-badge-badge {
        top: 8px !important;
        transform: translate(50%, -18%) !important;
    }

    .mhp-page .mhp-page-content {
        padding-top: 0.75rem;
    }

    .mhp-global-note-field textarea,
    .mhp-global-note-field .mud-input-slot {
        min-height: 280px !important;
        max-height: 62vh;
    }

    .mhp-appbar-toolbar-row:has(.mhp-submission-toolbar-wrap) .mhp-appbar-leading {
        max-width: min(470px, calc(100% - 205px));
        min-width: min(230px, 56vw);
    }

    .mhp-submission-toolbar-wrap {
        min-width: min(230px, 56vw);
    }

    .mhp-submission-toolbar-bar__inner {
        gap: 0.25rem;
        font-size: 0.8rem;
        flex-wrap: wrap;
    }

    .mhp-submission-toolbar-bar__deadline {
        flex-basis: 100%;
    }

    .mhp-submission-toolbar-bar__deadline-sep {
        display: none;
    }

    .mhp-submission-toolbar-bar {
        font-size: 0.8rem;
        min-height: 39px;
        padding: 7px 10px;
    }
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveG1sbnMiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
    border-radius: 10px;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.preview-error {
    background-color: #ffebee;
}

.preview-warning {
    background-color: #fff8e1;
}

/* --- Einheitliche Tabellen-Toolbar / Scroll (Personal-HH-Stellen, Freigaben, Mein Haushalt) --- */
.mhp-unified-selection-bar {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--mud-palette-surface);
}

.mhp-unified-bulk-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    box-sizing: border-box;
}

.mhp-unified-bulk-toolbar__info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    flex: 1 1 auto;
    min-width: 0;
}

.mhp-unified-bulk-toolbar__hint {
    flex: 1 1 12rem;
    min-width: 0;
}

.mhp-unified-bulk-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-left: auto;
    flex: 0 1 auto;
}

/* Suchzeile über Arbeitslisten (Freitext + Zurücksetzen), analog Mein Haushalt / Freigaben */
.mhp-unified-search-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    row-gap: 0.5rem;
    column-gap: 0.5rem;
    box-sizing: border-box;
}

.mhp-unified-top-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    row-gap: 0.5rem;
    column-gap: 0.5rem;
}

.mhp-unified-top-toolbar__meta {
    flex: 1 1 auto;
    min-width: 0;
}

.mhp-unified-top-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-left: auto;
    flex: 0 1 auto;
}

@media (max-width: 959.98px) {
    .mhp-unified-bulk-toolbar__actions,
    .mhp-unified-top-toolbar__actions {
        flex-basis: 100%;
        margin-left: 0;
        justify-content: flex-end;
    }
}

/* Rahmen + Clipping fuer MudTable-Scroll; min-width verhindert Flex-Layout-Sprengung */
.mhp-unified-table-wrap {
    min-width: 0;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    overflow: hidden;
}

.mhp-unified-data-table table {
    table-layout: auto;
}

.mhp-unified-data-table thead th {
    font-weight: 600;
    white-space: nowrap;
    vertical-align: middle;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.mhp-unified-data-table .mhp-sort-menu {
    display: inline-flex;
    align-items: center;
}

.mhp-unified-data-table .mhp-sort-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border: 0;
    background: transparent;
    color: inherit;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.mhp-unified-data-table .mhp-sort-menu-trigger:hover .mhp-sort-menu-trigger__label {
    text-decoration: underline;
}

.mhp-unified-data-table .mhp-sort-menu-trigger__icon {
    color: var(--mud-palette-text-secondary);
}

.mhp-unified-data-table .mhp-sort-menu-trigger__icon--active {
    color: var(--mud-palette-primary);
}

.mhp-sort-menu-proxy {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
}

.mhp-sort-menu-popover {
    z-index: 13050 !important;
    min-width: 15.5rem;
}

.mhp-sort-menu__item--active {
    color: var(--mud-palette-primary);
    font-weight: 600;
}

/* Spaltenkopf-Menü (Sichtbarkeit, wiederverwendbar) */
.mhp-unified-data-table .mhp-column-header-menu {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
}

.mhp-unified-data-table .mhp-column-header-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border: 0;
    background: transparent;
    color: inherit;
    padding: 0;
    font: inherit;
    cursor: pointer;
    max-width: 100%;
}

.mhp-unified-data-table .mhp-column-header-menu-trigger:hover .mhp-column-header-menu-trigger__label {
    text-decoration: underline;
}

.mhp-unified-data-table .mhp-column-header-menu-trigger__icon {
    color: var(--mud-palette-text-secondary);
    flex-shrink: 0;
}

.mhp-column-header-menu-popover {
    z-index: 13050 !important;
    min-width: 15.5rem;
}

/* Freigaben-Warteschlange: Spaltenbreite + Zeilenhöhe (Excel-ähnlich) */
.mhp-freigaben-queue-table-wrap {
    position: relative;
    overflow-x: auto;
    padding-bottom: 0.35rem;
}

.mhp-freigaben-queue-table table {
    table-layout: fixed;
    width: max-content;
    min-width: 100%;
}

/* Excel-ähnlich: Griff an der rechten Spaltengrenze (nur Kopfzeile) */
.mhp-freigaben-queue-table thead .mhp-resizable-th,
.mhp-freigaben-queue-table thead .mud-table-cell.mhp-resizable-th {
    position: relative;
    overflow: visible;
}

/* Kopf + Zellen: bei schmaler Spalte umbrechen statt ellipsis (vgl. .mhp-cell--wrap / Archiv-Tabelle) */
.mhp-freigaben-queue-table.mhp-unified-data-table thead th {
    white-space: normal;
    vertical-align: bottom;
    line-height: 1.25;
}

.mhp-freigaben-queue-table .mhp-resizable-th__label,
.mhp-freigaben-queue-table .mhp-sort-menu,
.mhp-freigaben-queue-table .mhp-sort-menu-trigger,
.mhp-freigaben-queue-table .mhp-sort-menu-trigger__label {
    display: block;
    width: 100%;
    min-width: 0;
    padding-right: 0.5rem;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.25;
}

.mhp-freigaben-queue-table .mhp-sort-menu-trigger {
    display: inline-flex;
    align-items: flex-start;
    flex-wrap: wrap;
    max-width: 100%;
    text-align: left;
}

.mhp-freigaben-queue-table .mhp-sort-menu-trigger__icon {
    flex-shrink: 0;
}

.mhp-freigaben-queue-table .mhp-freigaben-cell-text {
    display: block;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
    line-height: 1.3;
    max-width: 100%;
}

.mhp-freigaben-queue-table .mhp-column-resize-edge {
    position: absolute;
    top: 0;
    right: -4px;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    z-index: 20;
    user-select: none;
    touch-action: none;
}

.mhp-freigaben-queue-table .mhp-column-resize-edge:hover,
.mhp-freigaben-queue-table .mhp-column-resize-edge:focus {
    background: rgba(37, 99, 235, .25);
}

body.mhp-column-resizing {
    cursor: col-resize !important;
    user-select: none !important;
}

body.mhp-column-resizing .mhp-freigaben-queue-table .mhp-column-resize-edge {
    background: rgba(37, 99, 235, .25);
}

.mhp-freigaben-queue-table tbody .mud-table-row .mud-table-cell {
    min-height: var(--mhp-freigaben-row-height, 40px);
    height: auto;
    box-sizing: border-box;
    vertical-align: top;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.3;
}

/* Aktionen: Buttons einzeilig und klickbar lassen */
.mhp-freigaben-queue-table tbody .mud-table-cell.mhp-unified-col-actions {
    white-space: nowrap;
    vertical-align: middle;
}

.mhp-freigaben-queue-table tbody .mhp-unified-col-actions .mhp-unified-actions-cell {
    flex-wrap: nowrap;
}

.mhp-freigaben-queue-table-wrap .mhp-row-resize-edge {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 8px;
    cursor: row-resize;
    z-index: 20;
    user-select: none;
    touch-action: none;
}

.mhp-freigaben-queue-table-wrap .mhp-row-resize-edge:hover,
.mhp-freigaben-queue-table-wrap .mhp-row-resize-edge:focus {
    background: rgba(37, 99, 235, .25);
}

body.mhp-row-resizing {
    cursor: row-resize !important;
    user-select: none !important;
}

body.mhp-row-resizing .mhp-freigaben-queue-table-wrap .mhp-row-resize-edge {
    background: rgba(37, 99, 235, .25);
}

/* Excel-ähnliche Tabellen (programmweit: MeinHaushalt, Investiv, Bewirtschaftung, Archiv, …) */
.mhp-excel-table-wrap {
    position: relative;
    overflow-x: auto;
    padding-bottom: 0.35rem;
}

.mhp-excel-table table {
    table-layout: fixed;
    width: max-content;
    min-width: 100%;
}

.mhp-excel-table thead .mhp-resizable-th,
.mhp-excel-table thead .mud-table-cell.mhp-resizable-th {
    position: relative;
    overflow: visible;
}

.mhp-excel-table.mhp-unified-data-table thead th {
    white-space: normal;
    vertical-align: bottom;
    line-height: 1.25;
}

.mhp-excel-table .mhp-resizable-th__label,
.mhp-excel-table .mhp-sort-menu,
.mhp-excel-table .mhp-sort-menu-trigger,
.mhp-excel-table .mhp-sort-menu-trigger__label {
    display: block;
    width: 100%;
    min-width: 0;
    padding-right: 0.5rem;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    display: -webkit-box;
}

.mhp-excel-table .mhp-sort-menu-trigger {
    display: inline-flex;
    align-items: flex-start;
    flex-wrap: wrap;
    max-width: 100%;
    text-align: left;
}

.mhp-excel-table .mhp-column-resize-edge {
    position: absolute;
    top: 0;
    right: -4px;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    z-index: 20;
    user-select: none;
    touch-action: none;
}

.mhp-excel-table .mhp-column-resize-edge:hover,
.mhp-excel-table .mhp-column-resize-edge:focus {
    background: rgba(37, 99, 235, .25);
}

.mhp-excel-table tbody .mud-table-row .mud-table-cell {
    min-height: var(--mhp-table-row-height, 40px);
    height: auto;
    box-sizing: border-box;
    vertical-align: top;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
}

.mhp-excel-table-wrap .mhp-row-resize-edge {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 8px;
    cursor: row-resize;
    z-index: 20;
    user-select: none;
    touch-action: none;
}

.mhp-excel-table-wrap .mhp-row-resize-edge:hover,
.mhp-excel-table-wrap .mhp-row-resize-edge:focus {
    background: rgba(37, 99, 235, .25);
}

body.mhp-row-resizing .mhp-excel-table-wrap .mhp-row-resize-edge {
    background: rgba(37, 99, 235, .25);
}

body.mhp-column-resizing .mhp-excel-table .mhp-column-resize-edge {
    background: rgba(37, 99, 235, .25);
}

.mhp-status-compact-chip {
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Spaltensichtbarkeits-Dialog (wiederverwendbar für alle Tabellen) */
.mhp-column-vis-dialog .mud-dialog {
    max-width: 24rem;
}

.mhp-column-vis-list {
    padding: 0 !important;
    max-height: 24rem;
    overflow-y: auto;
}

.mhp-column-vis-list .mhp-column-vis-item {
    padding: 0.125rem 0.5rem;
}

.mhp-column-vis-locked-hint {
    margin-left: 2.25rem;
    display: block;
    font-style: italic;
}

.mhp-unified-data-table thead {
    position: relative;
    z-index: 20;
}

.mhp-unified-data-table tbody {
    position: relative;
    z-index: 1;
}

.mhp-unified-data-table tbody td {
    vertical-align: middle;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

/* Sticky Aktionsspalte (rechts): nur horizontal sticky, klare Layer-Hierarchie */
.mhp-unified-data-table thead > tr > th.mhp-unified-col-actions {
    position: sticky;
    right: 0;
    top: 0;
    z-index: 30;
    background: var(--mud-palette-surface);
    background-clip: padding-box;
    box-shadow: -4px 0 8px rgba(0, 0, 0, 0.06);
    width: var(--mhp-sticky-actions-width);
    min-width: var(--mhp-sticky-actions-width);
    max-width: var(--mhp-sticky-actions-width);
    overflow: hidden;
    isolation: isolate;
}

/* Sticky Aktionsspalte im tbody: nur echte TD, kein descendant-Selector */
.mhp-unified-data-table tbody > tr > td.mhp-unified-col-actions {
    position: sticky;
    right: 0;
    top: auto !important;
    bottom: auto !important;
    z-index: 10;
    box-shadow: -4px 0 8px rgba(0, 0, 0, 0.06);
    min-width: var(--mhp-sticky-actions-width);
    width: var(--mhp-sticky-actions-width);
    max-width: var(--mhp-sticky-actions-width);
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    vertical-align: middle;
    background-clip: padding-box;
    overflow: hidden;
    isolation: isolate;
    clip-path: inset(0);
}

.mhp-unified-data-table thead > tr > th.mhp-col-internal-budget-note {
    position: sticky;
    right: var(--mhp-sticky-actions-width);
    top: 0;
    z-index: 30;
    background: var(--mud-palette-surface);
    background-clip: padding-box;
    box-shadow: -4px 0 8px rgba(0, 0, 0, 0.05);
    width: var(--mhp-sticky-note-width);
    min-width: var(--mhp-sticky-note-width);
    max-width: var(--mhp-sticky-note-width);
    overflow: hidden;
    isolation: isolate;
}

.mhp-unified-data-table tbody > tr > td.mhp-col-internal-budget-note {
    position: sticky;
    right: var(--mhp-sticky-actions-width);
    top: auto !important;
    bottom: auto !important;
    z-index: 10;
    box-shadow: -4px 0 8px rgba(0, 0, 0, 0.05);
    background-clip: padding-box;
    width: var(--mhp-sticky-note-width);
    min-width: var(--mhp-sticky-note-width);
    max-width: var(--mhp-sticky-note-width);
    overflow: hidden;
    isolation: isolate;
    clip-path: inset(0);
}

.mhp-unified-actions-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    flex-wrap: nowrap;
    position: relative;
    z-index: 0;
}

.mhp-unified-action-hit {
    display: inline-flex;
    position: relative;
    z-index: 0;
}

.mhp-unified-plan-field.mud-input-control {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.mhp-unified-data-table .mhp-unified-col-actions .mhp-unified-row-submit {
    width: 2rem;
    height: 2rem;
    padding: 0;
}

.mhp-freigaben-filter-select {
    min-width: 11rem;
}

.mhp-ra-kpi {
    cursor: pointer;
    transition: box-shadow 0.16s ease, transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
    border: 1px solid var(--mhp-control-border);
    border-radius: 16px;
    background: linear-gradient(180deg, var(--mhp-control-surface) 0%, var(--mhp-control-surface-soft) 100%);
    box-shadow: var(--mhp-control-shadow);
}
.mhp-ra-kpi:hover {
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: var(--mhp-control-shadow-hover);
    transform: translateY(-1px);
}

.mhp-ra-kpi:focus-within {
    box-shadow: var(--mhp-control-shadow), var(--mhp-focus-ring);
}

.mhp-clickable-row {
    cursor: pointer;
}

.mhp-readonly-row {
    cursor: default;
}

/* Spalte „Interne Notiz“: Icon zentriert; etwas breiter als 3,25rem, damit StickyNote + Workflow-„-“ nicht visuell verschmelzen */
.mhp-unified-data-table th.mhp-col-internal-budget-note,
.mhp-unified-data-table td.mhp-col-internal-budget-note {
    min-width: var(--mhp-sticky-note-width);
    width: var(--mhp-sticky-note-width);
    max-width: var(--mhp-sticky-note-width);
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
}

.mhp-internal-budget-note-ad {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.25rem;
}
.mhp-internal-budget-note-ad--has .mhp-internal-budget-note-badge .mud-icon-button,
.mhp-internal-budget-note-ad--has .mhp-internal-budget-note-badge .mud-icon-root {
    /* Ausreichend Kontrast zum neutralen Zustand */
    flex-shrink: 0;
}

/* Mein Haushalt: Planbetrag-Spalte stabil neben schmaler Notiz-Spalte; Eingabefeld ausgerichtet */
.mhp-unified-data-table th.mhp-col-planbetrag,
.mhp-unified-data-table td.mhp-col-planbetrag {
    min-width: 12.5rem;
    vertical-align: middle;
    overflow: hidden;
}

.mhp-mh-data-table .mhp-planbetrag-cell,
.mhp-mh-data-table .mhp-plan-amount-cell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.mhp-mh-data-table .mhp-planbetrag-cell__field-row {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
}

.mhp-mh-data-table .mhp-planbetrag-cell .mud-input-control,
.mhp-mh-data-table .mhp-plan-amount-cell .mud-input-control,
.mhp-mh-data-table .mhp-planbetrag-cell input,
.mhp-mh-data-table .mhp-plan-amount-cell input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.mhp-mh-data-table .mhp-planbetrag-cell .mud-input-helper-text,
.mhp-mh-data-table .mhp-planbetrag-cell .mud-input-error,
.mhp-mh-data-table .mhp-plan-amount-cell .mud-input-helper-text,
.mhp-mh-data-table .mhp-plan-amount-cell .mud-input-error {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.mhp-mh-data-table th.mhp-unified-col-actions,
.mhp-mh-data-table td.mhp-unified-col-actions {
    min-width: 12.5rem;
}

.mhp-mh-data-table td.mhp-unified-col-actions {
    overflow: hidden;
}

.mhp-mh-data-table td.mhp-unified-col-actions .mhp-unified-actions-cell {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    justify-content: flex-start;
}

.mhp-mh-data-table td.mhp-unified-col-actions .mud-stack-row {
    flex-wrap: wrap;
    row-gap: 0.25rem;
}

.mhp-unified-data-table th.mhp-col-status,
.mhp-unified-data-table td.mhp-col-status {
    min-width: 12rem;
}

/* Personalstellen: linke Aktionsspalte (Checkbox + interne Notiz) */
.mhp-personal-detail-table th.mhp-unified-col-select,
.mhp-personal-detail-table td.mhp-unified-col-select,
.mhp-personal-detail-table th.mhp-col-selection,
.mhp-personal-detail-table td.mhp-col-selection,
.mhp-personal-aggregate-table th.mhp-col-selection,
.mhp-personal-aggregate-table td.mhp-col-selection {
    width: auto;
    min-width: 56px;
    max-width: 4.5rem;
    text-align: center;
    vertical-align: middle;
    padding-inline: 4px !important;
}

.mhp-personal-detail-table th.mhp-col-status,
.mhp-personal-detail-table td.mhp-col-status {
    width: 15rem;
    min-width: 15rem;
    max-width: 15rem;
}

.mhp-personal-detail-table td.mhp-col-status .mhp-personal-detail-status-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 0.35rem;
    align-items: center;
}

.mhp-personal-detail-table td.mhp-col-status .mud-chip {
    max-width: 100%;
}

.mhp-personal-detail-table td.mhp-col-status .mud-chip-content {
    overflow: hidden;
    text-overflow: ellipsis;
}

.mhp-personal-detail-table thead > tr > th.mhp-col-internal-budget-note,
.mhp-personal-detail-table tbody > tr > td.mhp-col-internal-budget-note,
.mhp-personal-detail-table thead > tr > th.mhp-unified-col-actions,
.mhp-personal-detail-table tbody > tr > td.mhp-unified-col-actions {
    border-left: 1px solid var(--mud-palette-lines-default);
}

.mhp-personal-detail-table .mhp-unified-actions-cell {
    width: 100%;
    justify-content: center;
}

.mhp-unified-data-table .mud-table-pagination {
    border-top: 1px solid var(--mud-palette-lines-default);
}

.mhp-unified-data-table .mhp-planbetrag-cell .mud-input-control {
    min-width: 7.5rem;
    max-width: 12rem;
}

/* Einheitliches Zebra für alle Tabellen mit Unified-Basis */
.mhp-unified-data-table table.mud-table > tbody > tr:nth-of-type(odd) > td {
    background-color: var(--mhp-table-zebra-odd);
}

.mhp-unified-data-table table.mud-table > tbody > tr:nth-of-type(even) > td {
    background-color: var(--mhp-table-zebra-even);
}

/* Sticky-Rechtszellen explizit einfärben, damit beim horizontalen Scrollen keine optischen Brüche entstehen */
.mhp-unified-data-table table.mud-table > tbody > tr:nth-of-type(odd) > td.mhp-unified-col-actions,
.mhp-unified-data-table table.mud-table > tbody > tr:nth-of-type(odd) > td.mhp-col-internal-budget-note {
    background-color: var(--mhp-table-zebra-odd) !important;
}

.mhp-unified-data-table table.mud-table > tbody > tr:nth-of-type(even) > td.mhp-unified-col-actions,
.mhp-unified-data-table table.mud-table > tbody > tr:nth-of-type(even) > td.mhp-col-internal-budget-note {
    background-color: var(--mhp-table-zebra-even) !important;
}

/* --- Globales Zebra-Striping: nur Datenzeilen (tbody), nicht Header/Toolbars --- */
.mhp-content-shell .mud-table-container table.mud-table > tbody > tr:nth-of-type(odd) > td,
.mud-dialog-container .mud-table-container table.mud-table > tbody > tr:nth-of-type(odd) > td,
.mud-dialog .mud-table-container table.mud-table > tbody > tr:nth-of-type(odd) > td,
.mhp-content-shell table.mud-table > tbody > tr:nth-of-type(odd) > td,
.mud-dialog-container table.mud-table > tbody > tr:nth-of-type(odd) > td,
.mud-dialog table.mud-table > tbody > tr:nth-of-type(odd) > td {
    background-color: var(--mhp-table-zebra-odd);
}

.mhp-content-shell .mud-table-container table.mud-table > tbody > tr:nth-of-type(even) > td,
.mud-dialog-container .mud-table-container table.mud-table > tbody > tr:nth-of-type(even) > td,
.mud-dialog .mud-table-container table.mud-table > tbody > tr:nth-of-type(even) > td,
.mhp-content-shell table.mud-table > tbody > tr:nth-of-type(even) > td,
.mud-dialog-container table.mud-table > tbody > tr:nth-of-type(even) > td,
.mud-dialog table.mud-table > tbody > tr:nth-of-type(even) > td {
    background-color: var(--mhp-table-zebra-even);
}

.mhp-content-shell .mud-simple-table table > tbody > tr:nth-of-type(odd) > td,
.mud-dialog-container .mud-simple-table table > tbody > tr:nth-of-type(odd) > td,
.mud-dialog .mud-simple-table table > tbody > tr:nth-of-type(odd) > td {
    background-color: var(--mhp-table-zebra-odd);
}

.mhp-content-shell .mud-simple-table table > tbody > tr:nth-of-type(even) > td,
.mud-dialog-container .mud-simple-table table > tbody > tr:nth-of-type(even) > td,
.mud-dialog .mud-simple-table table > tbody > tr:nth-of-type(even) > td {
    background-color: var(--mhp-table-zebra-even);
}

.mhp-content-shell tr.mud-table-row.mhp-row-editable:nth-of-type(odd) > td,
.mud-dialog-container tr.mud-table-row.mhp-row-editable:nth-of-type(odd) > td,
.mud-dialog tr.mud-table-row.mhp-row-editable:nth-of-type(odd) > td {
    background-color: var(--mhp-table-zebra-editable-odd) !important;
}

.mhp-content-shell tr.mud-table-row.mhp-row-editable:nth-of-type(even) > td,
.mud-dialog-container tr.mud-table-row.mhp-row-editable:nth-of-type(even) > td,
.mud-dialog tr.mud-table-row.mhp-row-editable:nth-of-type(even) > td {
    background-color: var(--mhp-table-zebra-editable-even) !important;
}

/* Hover / Focus: Muds Tabellen-Hover muss Zebra uebersteuern */
.mhp-content-shell .mud-table-container table.mud-table > tbody > tr:hover > td,
.mhp-content-shell table.mud-table > tbody > tr:hover > td,
.mud-dialog-container .mud-table-container table.mud-table > tbody > tr:hover > td,
.mud-dialog .mud-table-container table.mud-table > tbody > tr:hover > td,
.mud-dialog-container table.mud-table > tbody > tr:hover > td,
.mud-dialog table.mud-table > tbody > tr:hover > td,
.mhp-content-shell .mud-simple-table table > tbody > tr:hover > td,
.mud-dialog-container .mud-simple-table table > tbody > tr:hover > td,
.mud-dialog .mud-simple-table table > tbody > tr:hover > td {
    background-color: var(--mhp-table-row-hover) !important;
}

.mhp-content-shell .mud-table-container table.mud-table > tbody > tr:focus-within > td,
.mud-dialog-container .mud-table-container table.mud-table > tbody > tr:focus-within > td,
.mud-dialog .mud-table-container table.mud-table > tbody > tr:focus-within > td,
.mhp-content-shell table.mud-table > tbody > tr:focus-within > td,
.mud-dialog-container table.mud-table > tbody > tr:focus-within > td,
.mud-dialog table.mud-table > tbody > tr:focus-within > td,
.mhp-content-shell .mud-simple-table table > tbody > tr:focus-within > td,
.mud-dialog-container .mud-simple-table table > tbody > tr:focus-within > td,
.mud-dialog .mud-simple-table table > tbody > tr:focus-within > td {
    background-color: var(--mhp-table-row-hover) !important;
}

.mhp-content-shell .mud-table-container table.mud-table > tbody > tr:hover > td.mhp-unified-col-actions,
.mhp-content-shell .mud-table-container table.mud-table > tbody > tr:hover > td.mhp-col-internal-budget-note,
.mud-dialog-container .mud-table-container table.mud-table > tbody > tr:hover > td.mhp-unified-col-actions,
.mud-dialog-container .mud-table-container table.mud-table > tbody > tr:hover > td.mhp-col-internal-budget-note,
.mud-dialog .mud-table-container table.mud-table > tbody > tr:hover > td.mhp-unified-col-actions,
.mud-dialog .mud-table-container table.mud-table > tbody > tr:hover > td.mhp-col-internal-budget-note,
.mhp-content-shell .mud-table-container table.mud-table > tbody > tr:focus-within > td.mhp-unified-col-actions,
.mhp-content-shell .mud-table-container table.mud-table > tbody > tr:focus-within > td.mhp-col-internal-budget-note,
.mud-dialog-container .mud-table-container table.mud-table > tbody > tr:focus-within > td.mhp-unified-col-actions,
.mud-dialog-container .mud-table-container table.mud-table > tbody > tr:focus-within > td.mhp-col-internal-budget-note,
.mud-dialog .mud-table-container table.mud-table > tbody > tr:focus-within > td.mhp-unified-col-actions,
.mud-dialog .mud-table-container table.mud-table > tbody > tr:focus-within > td.mhp-col-internal-budget-note {
    background-color: var(--mhp-table-row-hover) !important;
}

.mhp-content-shell .mud-table-container table.mud-table > tbody > tr.mud-table-row-selected > td,
.mud-dialog-container .mud-table-container table.mud-table > tbody > tr.mud-table-row-selected > td,
.mud-dialog .mud-table-container table.mud-table > tbody > tr.mud-table-row-selected > td {
    background-color: rgba(0, 87, 163, 0.1) !important;
}

.mhp-content-shell .mud-table-container table.mud-table > tbody > tr.mud-table-row-selected > td.mhp-unified-col-actions,
.mhp-content-shell .mud-table-container table.mud-table > tbody > tr.mud-table-row-selected > td.mhp-col-internal-budget-note,
.mud-dialog-container .mud-table-container table.mud-table > tbody > tr.mud-table-row-selected > td.mhp-unified-col-actions,
.mud-dialog-container .mud-table-container table.mud-table > tbody > tr.mud-table-row-selected > td.mhp-col-internal-budget-note,
.mud-dialog .mud-table-container table.mud-table > tbody > tr.mud-table-row-selected > td.mhp-unified-col-actions,
.mud-dialog .mud-table-container table.mud-table > tbody > tr.mud-table-row-selected > td.mhp-col-internal-budget-note {
    background-color: rgba(0, 87, 163, 0.1) !important;
}

/* ungespeicherte Zeile (Hintergrund NACH Zebra + Hover, damit Markierung erhalten bleibt) */
.mhp-unified-data-table tbody tr.mhp-unified-row--dirty > td,
.mhp-unified-data-table tbody tr.mhp-unified-row--dirty:hover > td {
    background-color: var(--mhp-table-row-hover) !important;
}

.mhp-unified-data-table tbody tr.mhp-unified-row--dirty > td.mhp-unified-col-actions,
.mhp-unified-data-table tbody tr.mhp-unified-row--dirty > td.mhp-col-internal-budget-note,
.mhp-unified-data-table tbody tr.mhp-unified-row--dirty:hover > td.mhp-unified-col-actions,
.mhp-unified-data-table tbody tr.mhp-unified-row--dirty:hover > td.mhp-col-internal-budget-note {
    background-color: var(--mhp-table-row-hover) !important;
}

/* Fehler/Warnung in Zellen (z. B. Import-Vorschau) trotz Zebra */
.mhp-content-shell table.mud-table > tbody tr > td.preview-error,
.mud-dialog-container table.mud-table > tbody tr > td.preview-error,
.mud-dialog table.mud-table > tbody tr > td.preview-error {
    background-color: #ffebee !important;
}

.mhp-content-shell table.mud-table > tbody tr > td.preview-warning,
.mud-dialog-container table.mud-table > tbody tr > td.preview-warning,
.mud-dialog table.mud-table > tbody tr > td.preview-warning {
    background-color: #fff8e1 !important;
}

.mhp-bew-overplanned-amount {
    color: var(--mud-palette-error) !important;
    font-weight: 700;
}

.mhp-bew-spent-percent-cell {
    min-width: 5.5rem;
}

.mhp-bew-spent-percent-bar {
    margin-top: 2px;
}

.mhp-bew-spent-percent-warning {
    color: var(--mud-palette-warning-darken) !important;
    font-weight: 600;
}

.mhp-bew-spent-percent-critical {
    color: var(--mud-palette-error) !important;
    font-weight: 700;
}

/* =====================================================================
   Bewirtschaftungstabelle: keine Sticky-Spalten, stabile Spaltenbreiten
   ---------------------------------------------------------------------
   Root-Cause-Hinweis:
   Die Klasse `mhp-col-internal-budget-note` ist global als sticky am
   rechten Rand definiert (right: var(--mhp-sticky-actions-width)).
   Das ist nur dann korrekt, wenn unmittelbar rechts daneben eine
   sticky Aktionsspalte (`mhp-unified-col-actions`) am right:0 sitzt
   (z. B. Mein Haushalt). In Bewirtschaftung folgen nach der Notiz-
   Spalte normale, nicht-sticky Spalten ("Verlauf", "Quelle"), und es
   gibt gar keine Aktionsspalte. Beim horizontalen Scrollen blieb die
   Notiz-Zelle deshalb am rechten Rand "kleben" und ueberlagerte die
   nachfolgenden Inhalte. Zusaetzlich war im Header bisher gar keine
   Klasse gesetzt, sodass Header und Body unterschiedlich breit waren.
   Loesung: Sticky in Bewirtschaftung explizit deaktivieren und feste
   Spaltenbreiten/Min-Breiten setzen.
   ===================================================================== */

.mhp-bewirtschaftung-table thead > tr > th.mhp-col-internal-budget-note,
.mhp-bewirtschaftung-table tbody > tr > td.mhp-col-internal-budget-note {
    position: static !important;
    right: auto !important;
    z-index: auto !important;
    box-shadow: none !important;
    background: transparent !important;
    background-clip: border-box !important;
    isolation: auto !important;
    clip-path: none !important;
}

.mhp-bewirtschaftung-table table {
    table-layout: auto;
}

.mhp-bewirtschaftung-table th,
.mhp-bewirtschaftung-table td {
    box-sizing: border-box;
}

.mhp-bewirtschaftung-table th.mhp-bew-col-select,
.mhp-bewirtschaftung-table td.mhp-bew-col-select {
    width: 3rem;
    min-width: 3rem;
    max-width: 3.25rem;
    text-align: center;
    padding-inline: 6px !important;
}

.mhp-bewirtschaftung-table th.mhp-bew-col-costcenter-number,
.mhp-bewirtschaftung-table td.mhp-bew-col-costcenter-number {
    min-width: 7.25rem;
    white-space: nowrap;
}

.mhp-bewirtschaftung-table th.mhp-bew-col-costcenter-name,
.mhp-bewirtschaftung-table td.mhp-bew-col-costcenter-name {
    min-width: 14rem;
}

.mhp-bewirtschaftung-table th.mhp-bew-col-account-number,
.mhp-bewirtschaftung-table td.mhp-bew-col-account-number {
    min-width: 6.5rem;
    white-space: nowrap;
}

.mhp-bewirtschaftung-table th.mhp-bew-col-account-name,
.mhp-bewirtschaftung-table td.mhp-bew-col-account-name {
    min-width: 14rem;
}

.mhp-bewirtschaftung-table th.mhp-bew-col-amount,
.mhp-bewirtschaftung-table td.mhp-bew-col-amount {
    min-width: 8.5rem;
    white-space: nowrap;
    text-align: right;
}

.mhp-bewirtschaftung-table th.mhp-bew-col-amount .mhp-sort-menu,
.mhp-bewirtschaftung-table th.mhp-bew-col-amount .mhp-sort-menu-trigger {
    margin-left: auto;
}

.mhp-bewirtschaftung-table .mhp-bew-amount-stack {
    width: 100%;
    flex-wrap: nowrap;
}

.mhp-bewirtschaftung-table th.mhp-bew-col-asof,
.mhp-bewirtschaftung-table td.mhp-bew-col-asof {
    min-width: 11.5rem;
    white-space: nowrap;
}

.mhp-bewirtschaftung-table th.mhp-col-internal-budget-note,
.mhp-bewirtschaftung-table td.mhp-col-internal-budget-note {
    min-width: var(--mhp-sticky-note-width);
    width: var(--mhp-sticky-note-width);
    max-width: var(--mhp-sticky-note-width);
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    padding-inline: 6px !important;
}

/* Zeilenaktionen links: Checkbox, interne Notiz, Workflow-Verlauf */
.mhp-row-actions,
.mhp-selection-note-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.25rem;
    min-width: 56px;
}

.mhp-row-actions__select,
.mhp-row-actions__note,
.mhp-row-actions__workflow,
.mhp-row-actions__invoice,
.mhp-row-actions__hide {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    position: relative;
}

.mhp-row-actions__icon,
.mhp-row-actions__icon.mud-icon-button {
    width: 28px;
    height: 28px;
}

.mhp-row-actions .mud-badge-root {
    line-height: 0;
}

.mhp-internal-note-plus-host .mhp-internal-note-plus,
.mhp-internal-note-plus-host .mud-icon-button.mhp-internal-note-plus {
    color: var(--mud-palette-primary);
}

.mhp-internal-note-plus-host .mhp-internal-note-plus:hover,
.mhp-internal-note-plus-host .mud-icon-button.mhp-internal-note-plus:hover {
    background: rgba(37, 99, 235, .08);
}

.mhp-excel-table td.mhp-col-selection,
.mhp-unified-data-table td.mhp-col-selection {
    vertical-align: middle;
    text-align: center;
    padding-inline: 4px !important;
}

.mhp-bewirtschaftung-table th.mhp-bew-col-history,
.mhp-bewirtschaftung-table td.mhp-bew-col-history {
    min-width: 17rem;
    vertical-align: top;
}

.mhp-bewirtschaftung-table td.mhp-bew-col-history .mud-typography {
    overflow-wrap: anywhere;
}

.mhp-bewirtschaftung-table th.mhp-bew-col-source,
.mhp-bewirtschaftung-table td.mhp-bew-col-source {
    min-width: 14rem;
    max-width: 22rem;
    word-break: break-word;
}

/* Header und Body in der Bewirtschaftungstabelle nutzen die gemeinsamen
   Hintergrundregeln, daher explizit kein eigener Hintergrund mehr noetig.
   Das Zebra greift weiterhin ueber die `.mhp-unified-data-table`-Regeln. */


/* Digitaler Haushaltsplan (Leseansicht, druck-/PDF-tauglich) */
.mhp-digital-hp-toolbar {
    background: #fafafa;
}

.mhp-digital-hp-book {
    max-width: 56rem;
    margin: 0 auto 3rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 12px rgba(13, 71, 161, 0.08);
}

.mhp-digital-hp-book--editor .mhp-dhp-preview-block {
    border-radius: 4px;
    border: 1px solid transparent;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    cursor: pointer;
    outline: none;
}

.mhp-digital-hp-book--editor .mhp-dhp-preview-block:hover {
    border-color: rgba(0, 59, 122, 0.22);
    background-color: rgba(0, 59, 122, 0.03);
}

.mhp-digital-hp-book--editor .mhp-dhp-preview-block--selected {
    border-color: transparent;
    border-left: 4px solid #003b7a;
    box-shadow: none;
    background-color: rgba(0, 59, 122, 0.05);
}

.mhp-dhp-provenance-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.mhp-dhp-toc-note {
    font-size: 0.85rem;
    margin: 0 0 0.5rem;
}

.mhp-dhp-redaktion-preview-host {
    max-height: min(78vh, 52rem);
    overflow: auto;
    position: relative;
}

.mhp-dhp-dual-tabs .mud-tabs-panels {
    padding-top: 0.75rem;
}

.mhp-dhp-pdf-embed-wrap {
    border: 1px solid #cfd8dc;
    border-radius: 4px;
    background: #eceff1;
    overflow: hidden;
}

.mhp-dhp-pdf-embed-object {
    display: block;
    width: 100%;
    min-height: min(70vh, 48rem);
}

.mhp-dhp-redaktion-editor-sticky {
    position: sticky;
    top: 0.5rem;
    max-height: min(78vh, 52rem);
    overflow: auto;
}

.mhp-dhp-cover-editor-thumb-wrap {
    border: 1px solid #cfd8dc;
    background: #fafafa;
    padding: 0.35rem;
    max-width: 100%;
}

.mhp-dhp-cover-editor-thumb {
    display: block;
    max-width: 100%;
    max-height: 10rem;
    object-fit: contain;
    margin: 0 auto;
}

.mhp-dhp-cover-file-label {
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
    gap: 0.35rem;
    position: relative;
    overflow: hidden;
}

.mhp-dhp-cover-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    font-size: 0;
}

/* Stufe 3 Haushaltsplan-Archiv: kleine Click-Fläche um das Upload-Icon. */
.mhp-hha-upload-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 120ms ease-in-out;
}

.mhp-hha-upload-label:hover {
    background-color: rgba(29, 78, 216, 0.08);
}

.mhp-hha-upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    font-size: 0;
}

.mhp-digital-hp-cover {
    padding: 0;
    background: transparent;
    color: inherit;
}

.mhp-digital-hp-cover-outer {
    border: 1px solid #cfd8dc;
    background: #ffffff;
    padding: 1.65rem 1.4rem 1.75rem;
    box-sizing: border-box;
}

.mhp-digital-hp-cover-shell {
    display: grid;
    grid-template-columns: minmax(0, 13.2rem) minmax(0, 1fr);
    gap: 1.35rem;
    align-items: stretch;
}

@media (max-width: 720px) {
    .mhp-digital-hp-cover-shell {
        grid-template-columns: 1fr;
    }
}

.mhp-digital-hp-cover-art {
    min-height: 11.5rem;
    border: 1px solid #cfd8dc;
    background: #eceff1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.mhp-digital-hp-cover-art-img {
    width: 100%;
    height: 100%;
    min-height: 11.5rem;
    object-fit: cover;
    display: block;
}

.mhp-digital-hp-cover-art-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.85rem 0.65rem;
    color: #455a64;
    font-size: 0.78rem;
    line-height: 1.35;
}

.mhp-digital-hp-cover-art-placeholder-line1 {
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #003b7a;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.mhp-digital-hp-cover-art-placeholder-line2 {
    opacity: 0.92;
}

.mhp-digital-hp-cover-textcol {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mhp-digital-hp-cover-inner {
    max-width: none;
    margin: 0;
    text-align: left;
}

.mhp-digital-hp-cover-line {
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #003b7a;
    font-weight: 600;
    margin: 0 0 0.5rem;
    opacity: 1;
}

.mhp-digital-hp-cover-locations {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #455a64;
    margin: 0 0 0.85rem;
    line-height: 1.35;
    opacity: 1;
}

.mhp-digital-hp-cover-title {
    font-size: 1.85rem;
    font-weight: 700;
    margin: 0 0 0.2rem;
    line-height: 1.12;
    color: #003b7a;
}

.mhp-digital-hp-cover-year {
    font-size: 1.55rem;
    font-weight: 600;
    margin: 0 0 0.65rem;
    color: var(--mhp-primary);
}

.mhp-digital-hp-cover-sub {
    font-size: 0.88rem;
    color: #37474f;
    margin: 0 0 0.85rem;
    line-height: 1.4;
}

.mhp-digital-hp-cover-meta {
    font-size: 0.78rem;
    color: #607d8b;
    margin: 0;
}

.mhp-digital-hp-toc {
    padding: 1.75rem 2rem;
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
}

.mhp-digital-hp-toc h2 {
    font-size: 1.15rem;
    color: #003b7a;
    margin: 0 0 0.75rem;
}

.mhp-digital-hp-toc ul {
    margin: 0;
    padding-left: 1.25rem;
}

.mhp-digital-hp-toc a {
    color: var(--mhp-primary);
    text-decoration: none;
}

.mhp-digital-hp-toc a:hover {
    text-decoration: underline;
}

.mhp-digital-hp-preamble {
    padding: 1.5rem 2rem 1.25rem;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
}

.mhp-digital-hp-preamble-title {
    font-size: 1.05rem;
    color: #003b7a;
    margin: 0 0 0.65rem;
}

.mhp-digital-hp-preamble-body {
    font-size: 0.9rem;
    line-height: 1.45;
    color: #333;
    white-space: pre-wrap;
}

.mhp-digital-hp-charts {
    padding-top: 0.5rem;
}

.mhp-digital-hp-chart-card {
    border-color: #bbdefb !important;
    background: #fafcff;
}

.mhp-digital-hp-append-sep td {
    background: #e3f2fd;
    color: #0d47a1;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.65rem !important;
    border-bottom: 1px solid #90caf9;
}

.mhp-digital-hp-append-row td {
    background: #f5f9ff;
    color: #0d47a1;
    font-size: 0.85rem;
}

.mhp-digital-hp-chapter {
    padding: 1.75rem 2rem 2rem;
    scroll-margin-top: 5rem;
    border-bottom: 1px solid #eee;
}

.mhp-digital-hp-chapter:last-child {
    border-bottom: none;
}

.mhp-digital-hp-chapter-head h2 {
    font-size: 1.2rem;
    color: #003b7a;
    margin: 0 0 0.5rem;
}

.mhp-digital-hp-intro {
    font-size: 0.9rem;
    color: #424242;
    font-style: italic;
    margin: 0 0 1rem;
    max-width: 48rem;
}

.mhp-digital-hp-table-wrap {
    overflow-x: auto;
}

.mhp-digital-hp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.mhp-digital-hp-table thead th {
    background: var(--mhp-primary-dark);
    color: #fff;
    text-align: left;
    padding: 0.5rem 0.65rem;
    font-weight: 600;
}

.mhp-digital-hp-table tbody td {
    border-bottom: 1px solid #e0e0e0;
    padding: 0.45rem 0.65rem;
    vertical-align: top;
}

.mhp-digital-hp-table tbody tr:nth-child(even) td {
    background: #fafafa;
}

/* --- Referenz-UI: Dialoge, Hinweise, Popups, Formularsteuerung (global) --- */
.mud-dialog {
    border-radius: 12px !important;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.14), 0 2px 8px rgba(15, 23, 42, 0.06) !important;
}

.mud-dialog .mud-dialog-title {
    font-weight: 600;
    letter-spacing: -0.015em;
    font-size: 1.05rem;
}

.mud-overlay-dark {
    backdrop-filter: blur(2px);
}

.mud-alert {
    border-radius: 10px !important;
}

.mud-alert-dense {
    border-radius: 8px !important;
}

.mud-snackbar {
    border-radius: 10px !important;
    box-shadow: var(--mhp-shadow) !important;
}

.mud-popover .mud-paper,
.mud-popover-paper {
    border-radius: 10px !important;
    box-shadow: var(--mhp-shadow) !important;
}

.mud-switch-track {
    border-radius: 999px !important;
}

.mud-switch-base + .mud-switch-thumb {
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
}

.mud-checkbox .mud-button-root {
    border-radius: 8px;
}

.mud-button-outlined.mud-button-outlined-default,
.mud-button-outlined.mud-button-outlined-surface {
    border-color: var(--mhp-border) !important;
}

.mud-chip.mud-chip-size-small {
    border-radius: 999px !important;
}

.mud-picker .mud-picker-input {
    border-radius: 10px;
}

/* --- Referenz-UI: Toolbar, Zugriff, Tabellen, Eingaben (global) --- */
.mhp-scope-pill .mud-chip {
    border-radius: 999px !important;
    font-weight: 500;
    padding-inline: 12px;
    box-shadow: none !important;
}

.mhp-representation-mode-banner {
    border-left: 4px solid rgba(37, 99, 235, 0.55);
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.55) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.mhp-representation-mode-row {
    padding-top: 0.1rem;
}

.mhp-scope-chip {
    font-weight: 650;
    letter-spacing: 0.01em;
}

.mhp-scope-chip.mud-chip {
    min-height: 28px;
    border-radius: 999px !important;
    padding-inline: 10px !important;
    box-shadow: none !important;
    transition: border-color 0.14s ease, background-color 0.14s ease, color 0.14s ease;
}

.mhp-scope-chip--hh {
    border-color: rgba(30, 64, 175, 0.32) !important;
    color: #1d4ed8 !important;
    background-color: rgba(219, 234, 254, 0.45) !important;
}

.mhp-scope-chip--inv {
    border-color: rgba(79, 70, 229, 0.34) !important;
    color: #4338ca !important;
    background-color: rgba(224, 231, 255, 0.46) !important;
}

.mhp-scope-chip--amtsleitung {
    border-color: rgba(13, 148, 136, 0.36) !important;
    color: #0f766e !important;
    background-color: rgba(204, 251, 241, 0.5) !important;
}

.mhp-scope-chip--rechnungsamt {
    border-color: rgba(127, 29, 29, 0.34) !important;
    color: #7f1d1d !important;
    background-color: rgba(254, 226, 226, 0.45) !important;
}

.mhp-scope-chip--personal {
    border-color: rgba(13, 148, 136, 0.34) !important;
    color: #0f766e !important;
    background-color: rgba(204, 251, 241, 0.45) !important;
}

.mhp-scope-chip--bewirtschaftung {
    border-color: rgba(15, 23, 42, 0.28) !important;
    color: #334155 !important;
    background-color: rgba(226, 232, 240, 0.42) !important;
}

.mhp-culture-select {
    border-radius: 10px !important;
}

.mhp-culture-select .mud-input-slot {
    font-size: 0.875rem;
}

.mud-table-dense * .mud-table-row .mud-table-cell {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

.mud-textfield-outlined .mud-input-outlined-border {
    border-radius: 10px;
}

.mud-input-control {
    margin-bottom: 2px;
}

.mhp-kpi-card {
    height: 100%;
    cursor: pointer;
    border-radius: 16px !important;
    border: 1px solid var(--mhp-control-border) !important;
    background: linear-gradient(180deg, var(--mhp-control-surface) 0%, var(--mhp-control-surface-soft) 100%) !important;
    box-shadow: var(--mhp-control-shadow) !important;
    transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.mhp-kpi-card:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.28) !important;
    box-shadow: var(--mhp-control-shadow-hover) !important;
}

.mhp-kpi-card:focus-within {
    box-shadow: var(--mhp-control-shadow), var(--mhp-focus-ring) !important;
}

.mhp-kpi-card--active {
    border-color: var(--mhp-control-border-active) !important;
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.82) 0%, #ffffff 100%) !important;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08), 0 8px 22px rgba(37, 99, 235, 0.08) !important;
}

.mhp-kpi-card .mud-typography-caption {
    color: var(--mhp-muted);
    font-weight: 650;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.mhp-kpi-card .mud-typography-h5 {
    font-weight: 750;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.mhp-kpi-card .mhp-icon-muted {
    width: 2.45rem !important;
    height: 2.45rem !important;
    padding: 0.52rem;
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.08);
    opacity: 1;
}

.mhp-filter-panel {
    border-radius: 12px !important;
}

/* --- Final-Politur: Startseite, globale Alerts/Tabellen, KPI, Navigation --- */
.mhp-page--dashboard .mhp-page-header.mhp-page-header--ref {
    padding: 1.25rem 1.4rem 1.35rem !important;
    border-radius: 14px !important;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%) !important;
    border: 1px solid rgba(148, 163, 184, 0.28) !important;
    box-shadow: var(--mhp-shadow-soft) !important;
}

.mhp-page--dashboard .mhp-page-title {
    font-weight: 650 !important;
    letter-spacing: -0.02em !important;
}

.mhp-page--dashboard .mhp-page-description {
    max-width: 72ch;
    line-height: 1.55;
}

.mhp-dashboard-final {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.mhp-dashboard-panel {
    border-radius: 14px !important;
    border: 1px solid var(--mhp-border) !important;
    box-shadow: var(--mhp-shadow-soft) !important;
    background: #fff !important;
}

.mhp-home-action-links--final {
    border-radius: 14px !important;
    padding: 1.15rem 1.25rem 1.2rem !important;
    border: 1px solid var(--mhp-border) !important;
    box-shadow: var(--mhp-shadow-soft) !important;
    background: linear-gradient(180deg, #fff 0%, #fafbfc 100%) !important;
}

.mhp-home-action-links--final .mhp-action-bar .mud-button-root {
    min-height: 40px;
    border-radius: var(--mhp-control-radius) !important;
    font-weight: 650;
    padding-inline: 15px !important;
    text-transform: none;
    letter-spacing: 0;
}

.mhp-dashboard-followup-actions {
    gap: 0.5rem 0.75rem !important;
}

.mhp-alert-pro.mud-alert {
    padding: 0.95rem 1.15rem 1rem;
    border-radius: 13px;
    line-height: 1.5;
}

.mud-alert.mud-alert-outlined {
    border-width: 1px;
}

.mud-alert.mud-alert-filled {
    box-shadow: var(--mhp-shadow-soft);
}

.mud-alert.mud-dense {
    padding: 0.65rem 0.85rem;
}

.mhp-nav-menu .mud-nav-group {
    margin-bottom: 2px;
}

.mhp-nav-menu .mud-nav-group .mud-nav-group-text {
    padding-top: 6px;
    padding-bottom: 4px;
}

.mhp-nav-menu .mud-nav-link .mud-icon-root {
    font-size: 1.15rem;
    opacity: 0.92;
}

.mhp-nav-menu .mud-nav-link.active .mud-icon-root {
    opacity: 1;
    color: var(--mhp-primary) !important;
}

.mhp-nav-menu .mud-nav-link:hover:not(.active) {
    background: rgba(148, 163, 184, 0.1) !important;
}

.mhp-nav-menu .mud-nav-link.active {
    border-radius: 11px;
    font-weight: 650;
}

.mhp-mh-kpi-grid {
    gap: 14px !important;
}

.mhp-mh-kpi-card {
    padding: 16px 16px 15px !important;
    min-height: 5.85rem !important;
    border-radius: 15px !important;
}

.mhp-mh-kpi-card__icon {
    width: 2.65rem !important;
    height: 2.65rem !important;
    border-radius: 14px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.mhp-mh-kpi-card__value {
    font-size: clamp(1.62rem, 2.5vw, 2.05rem) !important;
    font-weight: 720 !important;
}

.mhp-mh-kpi-card__label {
    font-size: 0.68rem !important;
    letter-spacing: 0.05em !important;
}

.mhp-mh-kpi-card--active {
    transform: translateY(-1px);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.14), 0 12px 32px rgba(37, 99, 235, 0.11) !important;
}

.mhp-planbetrag-cell__field-row {
    width: 100%;
    min-width: 0;
}

.mud-table-root .mud-table-head .mud-table-cell {
    background: linear-gradient(180deg, #eef2f7 0%, #e8edf3 100%) !important;
    color: var(--mhp-primary-dark) !important;
    font-weight: 650 !important;
    font-size: 0.78rem !important;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(148, 163, 184, 0.4) !important;
    padding-top: 13px !important;
    padding-bottom: 13px !important;
}

.mud-table-root .mud-table-body .mud-table-cell {
    font-size: 0.875rem;
    padding-top: 11px !important;
    padding-bottom: 11px !important;
    border-color: rgba(226, 232, 240, 0.95) !important;
}

.mud-table-root .mud-table-body .mud-table-row:hover {
    background: rgba(37, 99, 235, 0.032) !important;
}

.mud-table-root tbody > tr.mud-table-row-selected > .mud-table-cell {
    background: rgba(37, 99, 235, 0.055) !important;
}

.mud-table-root .mhp-col-status .mud-chip {
    border-radius: 999px !important;
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    min-height: 26px;
    padding-inline: 10px;
    box-shadow: none !important;
}

.mud-table-root thead > tr > th.mhp-unified-col-actions,
.mud-table-root tbody > tr > td.mhp-unified-col-actions {
    background-clip: padding-box;
}

.mud-table-root thead > tr > th.mhp-unified-col-actions {
    background: linear-gradient(180deg, #e8edf3 0%, #e2e8f0 100%) !important;
    box-shadow: -4px 0 12px rgba(15, 23, 42, 0.035) !important;
}

.mud-table-root tbody > tr > td.mhp-unified-col-actions {
    background: rgba(252, 252, 253, 0.98) !important;
    box-shadow: -4px 0 10px rgba(15, 23, 42, 0.028) !important;
}

.mud-table-root .mud-table-head .mud-table-row .mud-table-cell:first-child .mud-checkbox,
.mud-table-root .mud-table-body .mud-table-row .mud-table-cell:first-child .mud-checkbox {
    transform: scale(0.96);
}

/* -------------------------------------------------------------------------- */
/* Dialog „Interne Notiz“: Drag über Titel (JS: mhp-mud-dialog-drag.js)       */
/* -------------------------------------------------------------------------- */
.mhp-internal-note-dialog-title-strip.mud-dialog-title {
    min-height: 48px;
    align-items: center;
    padding-top: 8px;
    padding-bottom: 8px;
}

.mhp-internal-note-dialog-title-inner {
    flex: 1;
    min-width: 0;
}

.mhp-internal-note-struct-row .mhp-internal-note-amount-field {
    flex: 0 0 9.5rem;
    max-width: 9.5rem;
}

@media (max-width: 600px) {
    .mhp-internal-note-struct-row {
        flex-wrap: wrap;
    }

    .mhp-internal-note-struct-row .mhp-internal-note-amount-field {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

.mhp-mud-dialog-drag-target {
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.mhp-mud-dialog-drag-target:active {
    cursor: grabbing;
}

.mhp-mud-dialog-drag-handle {
    flex: 0 0 auto;
    min-height: 10px;
    margin: 0;
    padding: 0;
    border-radius: var(--mud-default-borderradius, 12px) var(--mud-default-borderradius, 12px) 0 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.06) 0%, rgba(15, 23, 42, 0.02) 100%);
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.mhp-mud-dialog-drag-handle:active {
    cursor: grabbing;
}

@media (max-width: 399px) {
    .mhp-mud-dialog-drag-handle {
        min-height: 8px;
    }
}

@media print {
    .mhp-digital-hp-toolbar,
    .mud-appbar,
    .mhp-nav-menu,
    .mud-drawer {
        display: none !important;
    }

    .mhp-digital-hp-book {
        box-shadow: none;
        border: none;
        max-width: none;
    }

    .mhp-digital-hp-chapter {
        break-inside: avoid;
    }

    .mhp-digital-hp-table thead {
        display: table-header-group;
    }
}

/* Desktop-Startseite + Schnellsuche */
.mhp-desktop-panel {
    border-radius: 16px !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
    box-shadow: var(--mhp-control-shadow) !important;
}

.mhp-block-title-row {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-width: 0;
}

.mhp-help-video-icon {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    border-radius: 999px !important;
    color: var(--mhp-primary) !important;
}

.mhp-help-video-icon:hover {
    background: var(--mhp-primary-soft) !important;
}

.mhp-help-video-icon .mud-icon-root {
    font-size: 1.1rem !important;
}

.mhp-help-video-button--compact {
    min-height: 32px !important;
}

/* Kontext-Hilfe & Akademie-Video-Dialoge */
.mhp-academy-watch-dialog.mud-dialog {
    border-radius: 18px !important;
    overflow: hidden;
}

.mhp-academy-watch-dialog .mud-dialog-content {
    padding: 0 !important;
}

.mhp-help-dialog__shell {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: min(88vh, 920px);
}

.mhp-help-dialog__header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.35rem 1.5rem 1rem;
    background: linear-gradient(180deg, #ffffff 0%, var(--mhp-primary-soft) 100%);
    border-bottom: 1px solid rgba(37, 99, 235, 0.12);
}

.mhp-help-dialog__icon {
    flex: 0 0 auto;
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.14);
}

.mhp-help-dialog__icon--info {
    background: linear-gradient(145deg, #dbeafe 0%, #eff6ff 100%);
    color: var(--mhp-primary);
}

.mhp-help-dialog__icon--video {
    background: linear-gradient(145deg, #bfdbfe 0%, #eff6ff 100%);
    color: var(--mhp-primary-dark);
}

.mhp-help-dialog__icon .mud-icon-root {
    font-size: 1.55rem;
}

.mhp-help-dialog__header-text {
    min-width: 0;
    flex: 1 1 auto;
}

.mhp-help-dialog__eyebrow {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mhp-primary);
    margin-bottom: 0.2rem;
}

.mhp-help-dialog__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--mhp-primary-dark);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    margin-bottom: 0.45rem;
}

.mhp-help-dialog__title {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.mhp-help-dialog__subtitle {
    margin: 0.45rem 0 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #475569;
    max-width: 42rem;
}

.mhp-help-dialog__content {
    padding: 1.15rem 1.5rem 0.25rem;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.mhp-help-dialog__video-card {
    border-radius: 16px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
    margin-bottom: 1rem;
}

.mhp-help-dialog__video-card .mhp-help-dialog__video,
.mhp-help-dialog__video-card .mhp-academy-video-player {
    display: block;
    width: 100%;
    max-height: min(52vh, 480px);
    border-radius: 0;
    background: #000;
}

.mhp-help-dialog__highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.mhp-help-dialog__highlight-card {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid rgba(37, 99, 235, 0.14);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.mhp-help-dialog__highlight-icon {
    color: var(--mhp-primary);
    margin-top: 0.1rem;
}

.mhp-help-dialog__highlight-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.mhp-help-dialog__highlight-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.mhp-help-dialog__highlight-text {
    font-size: 0.74rem;
    line-height: 1.4;
    color: #64748b;
}

.mhp-help-dialog__info-card {
    padding: 0.95rem 1rem;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, rgba(239, 246, 255, 0.55) 100%);
    border: 1px solid rgba(37, 99, 235, 0.12);
    margin-bottom: 1rem;
}

.mhp-help-dialog__paragraph {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.65;
    color: #334155;
    max-width: 40rem;
}

.mhp-help-dialog__paragraph + .mhp-help-dialog__paragraph {
    margin-top: 0.75rem;
}

.mhp-help-dialog__steps-section {
    margin-bottom: 1rem;
}

.mhp-help-dialog__section-title {
    margin: 0 0 0.65rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--mhp-primary-dark);
}

.mhp-help-dialog__steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.mhp-help-dialog__step {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.mhp-help-dialog__step-index {
    flex: 0 0 auto;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(145deg, var(--mhp-primary) 0%, #1d4ed8 100%);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.28);
}

.mhp-help-dialog__step-text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.93rem;
    line-height: 1.5;
    color: #1e293b;
    padding-top: 0.1rem;
}

.mhp-help-dialog__description {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: var(--mhp-primary-soft);
    border: 1px solid rgba(37, 99, 235, 0.2);
    margin-bottom: 0.5rem;
    max-width: 42rem;
}

.mhp-help-dialog__description-icon {
    color: var(--mhp-primary);
    margin-top: 0.15rem;
    flex: 0 0 auto;
}

.mhp-help-dialog__description-text {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #334155;
}

.mhp-help-dialog__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1.5rem 1.25rem;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    background: #ffffff;
}

.mhp-help-dialog__action-secondary {
    order: 1;
}

.mhp-help-dialog__action-primary {
    order: 2;
}

.mhp-help-dialog--video .mhp-help-dialog__content {
    padding-top: 1rem;
}

@media (max-width: 600px) {
    .mhp-help-dialog__header {
        padding: 1.1rem 1rem 0.85rem;
    }

    .mhp-help-dialog__content {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .mhp-help-dialog__actions {
        flex-direction: column-reverse;
        align-items: stretch;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .mhp-help-dialog__actions .mud-button-root {
        width: 100%;
    }

    .mhp-help-dialog__highlights {
        grid-template-columns: 1fr;
    }

    .mhp-help-dialog__title {
        font-size: 1.2rem;
    }
}

/* Drag-Zone: keine Abschnitte des Kontextmenüs / Popovers clipen */
.mhp-desktop-drop-root,
.mhp-desktop-drop-root .mud-drop-zone,
.mhp-desktop-zone.mud-drop-zone {
    overflow: visible !important;
}

.mhp-desktop-zone .mud-drop-item {
    overflow: visible !important;
}

.mhp-desktop-tile-root {
    position: relative;
    width: 196px;
    height: 212px;
    flex-shrink: 0;
}

.mhp-desktop-zone {
    gap: 16px;
    align-items: stretch;
}

.mhp-desktop-tile {
    width: 100%;
    height: 100%;
    border-radius: 18px;
    border: 1px solid var(--mhp-control-border);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: var(--mhp-control-shadow);
    transition: box-shadow 0.16s ease, border-color 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.mhp-desktop-tile:hover {
    border-color: rgba(37, 99, 235, 0.3);
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.66) 0%, #ffffff 100%);
    box-shadow: var(--mhp-control-shadow-hover);
    transform: translateY(-1px);
}

.mhp-desktop-tile:focus-within {
    border-color: var(--mhp-control-border-active);
    box-shadow: var(--mhp-control-shadow), var(--mhp-focus-ring);
}

.mhp-desktop-tile--clickable {
    cursor: pointer;
}

.mhp-desktop-tile-stack {
    height: 100%;
}

.mhp-desktop-tile-icon-wrap {
    width: 46px;
    height: 46px;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(37, 99, 235, 0.09);
}

.mhp-desktop-tile-icon {
    font-size: 28px !important;
}

.mhp-desktop-tile-title {
    width: 100%;
    min-height: 40px;
    max-height: 40px;
    margin-top: 1px;
    margin-bottom: 0;
    padding-inline: 2px;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.25rem;
    font-weight: 650;
    color: var(--mud-palette-text-primary, #0f172a);
}

.mhp-desktop-tile-cat {
    max-width: 100%;
}

.mhp-desktop-tile-chip-wrap {
    min-height: 26px;
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.mhp-desktop-tile-chip {
    max-width: 100%;
    border-color: rgba(148, 163, 184, 0.42) !important;
    background: rgba(248, 250, 252, 0.88) !important;
    color: #475569 !important;
    font-weight: 650;
    letter-spacing: 0.01em;
}

.mhp-desktop-tile-chip .mud-chip-content {
    max-width: 132px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mhp-desktop-tile-actions {
    width: 100%;
    min-height: 40px;
    margin-top: auto;
    padding-top: 4px;
    flex-wrap: nowrap;
    gap: 6px;
}

.mhp-desktop-tile-actions .mud-button-root {
    min-width: 88px;
    letter-spacing: 0;
}

.mhp-desktop-open-btn.mud-button-root {
    background: rgba(37, 99, 235, 0.08) !important;
    border: 1px solid rgba(37, 99, 235, 0.16) !important;
    color: #1d4ed8 !important;
    font-weight: 700;
}

.mhp-desktop-open-btn.mud-button-root:hover {
    background: rgba(37, 99, 235, 0.12) !important;
    border-color: rgba(37, 99, 235, 0.32) !important;
}

.mhp-desktop-tile-delete-host {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-inline-start: 2px;
}

.mhp-desktop-tile-delete-btn.mud-icon-button {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    background: rgba(248, 250, 252, 0.84) !important;
    color: var(--mud-palette-text-secondary, #64748b) !important;
    box-shadow: var(--mhp-control-shadow);
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.mhp-desktop-tile-delete-btn.mud-icon-button:hover {
    background: rgba(220, 38, 38, 0.08) !important;
    border-color: rgba(220, 38, 38, 0.32);
    color: #b91c1c !important;
    box-shadow: var(--mhp-control-shadow-hover);
    transform: translateY(-1px);
}

.mhp-desktop-tile-delete-btn.mud-icon-button:focus-visible {
    outline: 2px solid rgba(220, 38, 38, 0.36);
    outline-offset: 1px;
}

@media (max-width: 599px) {
    .mhp-desktop-tile-root {
        width: 164px;
        height: 196px;
    }

    .mhp-desktop-tile-title {
        min-height: 36px;
        max-height: 36px;
        line-height: 1.125rem;
    }
}

.mhp-quicksearch-list .mud-list-item {
    padding-top: 6px;
    padding-bottom: 6px;
}

.mhp-quicksearch-row-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    flex-wrap: wrap;
}

/* Schnellsuche: ruhige Chip-Zeile pro Treffer (Typ / Status / Station / Kontext). */
.mhp-quicksearch-chip-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    margin-top: 4px;
}

.mhp-quicksearch-chip.mud-chip {
    height: 22px;
    border-radius: 999px !important;
    padding-inline: 9px !important;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: none !important;
    border-color: rgba(148, 163, 184, 0.4) !important;
    background-color: rgba(248, 250, 252, 0.86) !important;
    color: #475569 !important;
}

.mhp-quicksearch-chip--kind.mud-chip {
    border-color: rgba(30, 64, 175, 0.32) !important;
    color: #1d4ed8 !important;
    background-color: rgba(219, 234, 254, 0.5) !important;
}

.mhp-quicksearch-chip--station.mud-chip {
    border-color: rgba(13, 148, 136, 0.32) !important;
    color: #0f766e !important;
    background-color: rgba(204, 251, 241, 0.45) !important;
}

.mhp-quicksearch-chip--note.mud-chip {
    border-color: rgba(217, 119, 6, 0.32) !important;
    color: #b45309 !important;
    background-color: rgba(254, 243, 199, 0.55) !important;
}

.mhp-quicksearch-chip--status.mud-chip {
    border-color: rgba(100, 116, 139, 0.4) !important;
    color: #334155 !important;
    background-color: rgba(241, 245, 249, 0.85) !important;
}

.mhp-quicksearch-chip--status-draft.mud-chip {
    border-color: rgba(100, 116, 139, 0.4) !important;
    color: #334155 !important;
    background-color: rgba(241, 245, 249, 0.85) !important;
}

.mhp-quicksearch-chip--status-review.mud-chip {
    border-color: rgba(202, 138, 4, 0.36) !important;
    color: #92400e !important;
    background-color: rgba(254, 240, 199, 0.5) !important;
}

.mhp-quicksearch-chip--status-approved.mud-chip {
    border-color: rgba(22, 163, 74, 0.32) !important;
    color: #166534 !important;
    background-color: rgba(220, 252, 231, 0.55) !important;
}

.mhp-quicksearch-chip--status-returned.mud-chip {
    border-color: rgba(220, 38, 38, 0.32) !important;
    color: #b91c1c !important;
    background-color: rgba(254, 226, 226, 0.5) !important;
}

.mhp-quicksearch-chip--status-neutral.mud-chip {
    border-color: rgba(148, 163, 184, 0.4) !important;
    color: #475569 !important;
    background-color: rgba(248, 250, 252, 0.86) !important;
}

.mhp-minw-0 {
    min-width: 0;
}

/* --- Startseiten-Hero "Heute wichtig" --------------------------------------------------------
   Hochwertiger, dauerhafter Fokusbereich der Startseite. Ruhige Karte mit klarer
   typografischer Hierarchie (Begruessung -> Titel -> Lead) und Hinweise als
   feine Mini-Fokus-Karten (Icon-Bubble, grosse Zahl, dezente Beschreibung). */
.mhp-home-hero {
    --mhp-hero-tone: rgba(148, 163, 184, 0.28);
    --mhp-hero-tone-soft: rgba(148, 163, 184, 0.12);
    --mhp-hero-tone-text: #334155;
    border: 1px solid rgba(148, 163, 184, 0.28) !important;
    background:
        radial-gradient(120% 160% at 100% 0%, rgba(37, 99, 235, 0.045) 0%, rgba(37, 99, 235, 0) 55%),
        linear-gradient(180deg, #ffffff 0%, #f7fafc 100%) !important;
    box-shadow: var(--mhp-shadow-soft) !important;
    border-radius: 18px !important;
    padding: 1.6rem 1.85rem 1.65rem !important;
    margin-bottom: 1rem;
}

.mhp-home-hero__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.mhp-home-hero__head-text {
    min-width: 0;
    flex: 1 1 22rem;
}

.mhp-home-hero__eyebrow {
    display: block;
    color: var(--mhp-muted);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.72rem;
    margin: 0 0 0.4rem 0;
}

.mhp-home-hero__title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 600 !important;
    letter-spacing: -0.005em;
    color: #0f172a !important;
    font-size: clamp(1.15rem, 1.5vw, 1.35rem) !important;
    line-height: 1.25 !important;
    margin: 0 0 0.35rem 0 !important;
}

.mhp-home-hero__title-icon {
    color: #1d4ed8 !important;
    width: 1.15rem !important;
    height: 1.15rem !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    flex: 0 0 auto;
}

.mhp-home-hero__lead {
    color: var(--mhp-muted) !important;
    font-size: 0.92rem !important;
    line-height: 1.45 !important;
    margin: 0 !important;
    max-width: 38rem;
}

.mhp-home-hero__date {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
    padding: 0.45rem 0.85rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.24);
    color: var(--mhp-muted);
    font-feature-settings: "tnum" 1;
    line-height: 1.15;
    flex: 0 0 auto;
}

.mhp-home-hero__date-weekday {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.mhp-home-hero__date-full {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
}

@media (max-width: 640px) {
    .mhp-home-hero {
        padding: 1.25rem 1.2rem 1.3rem !important;
    }

    .mhp-home-hero__head {
        gap: 0.75rem;
    }

    .mhp-home-hero__date {
        align-self: flex-start;
        align-items: flex-start;
    }
}

.mhp-home-hero__hints {
    list-style: none;
    padding: 0;
    margin: 1.05rem 0 0 0;
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
}

.mhp-home-hero__hint {
    --mhp-hint-tone: rgba(148, 163, 184, 0.55);
    --mhp-hint-tone-soft: rgba(148, 163, 184, 0.12);
    --mhp-hint-tone-strong: #475569;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem 0.85rem 1.05rem;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    isolation: isolate;
    transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.mhp-home-hero__hint::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--mhp-hint-tone);
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.mhp-home-hero__hint:hover {
    border-color: rgba(148, 163, 184, 0.45);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.mhp-home-hero__hint-mark {
    flex: 0 0 auto;
    width: 2.4rem;
    height: 2.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--mhp-hint-tone-soft);
    color: var(--mhp-hint-tone-strong);
}

.mhp-home-hero__hint-icon {
    width: 1.15rem !important;
    height: 1.15rem !important;
    color: inherit !important;
}

.mhp-home-hero__hint-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
    gap: 0.1rem;
}

.mhp-home-hero__hint-count {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
    font-feature-settings: "tnum" 1;
}

.mhp-home-hero__hint-label {
    font-size: 0.83rem;
    font-weight: 500;
    color: #475569;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Tonierungen: dezent, links Akzentbalken + farbige Icon-Bubble. */
.mhp-home-hero__hint--accent {
    --mhp-hint-tone: #d97706;
    --mhp-hint-tone-soft: rgba(217, 119, 6, 0.12);
    --mhp-hint-tone-strong: #b45309;
}

.mhp-home-hero__hint--critical {
    --mhp-hint-tone: #dc2626;
    --mhp-hint-tone-soft: rgba(220, 38, 38, 0.12);
    --mhp-hint-tone-strong: #b91c1c;
}

.mhp-home-hero__hint--positive {
    --mhp-hint-tone: #16a34a;
    --mhp-hint-tone-soft: rgba(22, 163, 74, 0.12);
    --mhp-hint-tone-strong: #15803d;
}

/* Empty-Variante: ruhige zentrale Karte. */
.mhp-home-hero__empty {
    margin: 1rem 0 0 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.1rem;
    background: rgba(240, 253, 244, 0.55);
    border: 1px solid rgba(22, 163, 74, 0.22);
    border-radius: 12px;
    color: #0f172a;
}

.mhp-home-hero__empty-mark {
    flex: 0 0 auto;
    width: 2.4rem;
    height: 2.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.16);
    color: #15803d;
}

.mhp-home-hero__empty-mark .mud-icon-root {
    width: 1.25rem !important;
    height: 1.25rem !important;
}

.mhp-home-hero__empty-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.mhp-home-hero__empty-title {
    font-weight: 600 !important;
    color: #0f172a !important;
    margin: 0 !important;
}

.mhp-home-hero__empty-lead {
    color: var(--mhp-muted) !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

.mhp-home-hero__sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* --- Haushaltsanalyse: Management- und Steuerungsansicht ------------------------------- */
.mhp-haushaltsanalyse-hero,
.mhp-haushaltsanalyse-panel,
.mhp-haushaltsanalyse-execution,
.mhp-haushaltsanalyse-tools .mud-expand-panel {
    border: 1px solid rgba(148, 163, 184, 0.28) !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    border-radius: 16px !important;
    box-shadow: var(--mhp-shadow-soft) !important;
}

.mhp-haushaltsanalyse-hero {
    padding: 1.35rem 1.45rem 1.45rem !important;
    margin-bottom: 1rem;
}

.mhp-haushaltsanalyse-hero__copy {
    max-width: 78ch;
}

.mhp-haushaltsanalyse-eyebrow {
    color: #475569 !important;
    font-weight: 750 !important;
    letter-spacing: 0.075em !important;
}

.mhp-haushaltsanalyse-title,
.mhp-haushaltsanalyse-section-title {
    color: #0f172a !important;
    font-weight: 750 !important;
    letter-spacing: -0.025em !important;
}

.mhp-haushaltsanalyse-lead,
.mhp-haushaltsanalyse-section-lead,
.mhp-haushaltsanalyse-muted {
    color: #64748b !important;
    line-height: 1.55;
}

.mhp-haushaltsanalyse-section {
    margin-top: 1.15rem;
}

.mhp-haushaltsanalyse-metric,
.mhp-haushaltsanalyse-task,
.mhp-haushaltsanalyse-investment,
.mhp-haushaltsanalyse-risk,
.mhp-haushaltsanalyse-system-kpi,
.mhp-haushaltsanalyse-fact {
    height: 100%;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.mhp-haushaltsanalyse-metric {
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

.mhp-haushaltsanalyse-metric__icon,
.mhp-haushaltsanalyse-investment__icon,
.mhp-haushaltsanalyse-risk__icon {
    color: #1d4ed8 !important;
    background: rgba(37, 99, 235, 0.08);
    border-radius: 12px;
    padding: 0.42rem;
    width: 2.25rem !important;
    height: 2.25rem !important;
    margin-bottom: 0.5rem;
}

.mhp-haushaltsanalyse-metric__label {
    display: block;
    color: #475569 !important;
    font-weight: 700 !important;
    min-height: 2.4em;
}

.mhp-haushaltsanalyse-metric__value {
    color: #0f172a !important;
    font-weight: 800 !important;
    letter-spacing: -0.035em !important;
}

.mhp-haushaltsanalyse-metric__note {
    color: #64748b !important;
    line-height: 1.4;
}

.mhp-haushaltsanalyse-metric--critical,
.mhp-haushaltsanalyse-risk--critical {
    border-color: rgba(220, 38, 38, 0.24);
    background: linear-gradient(180deg, #fff 0%, rgba(254, 242, 242, 0.74) 100%);
}

.mhp-haushaltsanalyse-metric--warning,
.mhp-haushaltsanalyse-task--warning,
.mhp-haushaltsanalyse-risk--warning,
.mhp-haushaltsanalyse-fact--warning {
    border-color: rgba(245, 158, 11, 0.28);
    background: linear-gradient(180deg, #fff 0%, rgba(255, 251, 235, 0.78) 100%);
}

.mhp-haushaltsanalyse-metric--positive,
.mhp-haushaltsanalyse-task--positive {
    border-color: rgba(22, 163, 74, 0.24);
    background: linear-gradient(180deg, #fff 0%, rgba(240, 253, 244, 0.78) 100%);
}

.mhp-haushaltsanalyse-bar-row {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.86);
}

.mhp-haushaltsanalyse-bar-row:last-child {
    border-bottom: 0;
}

.mhp-haushaltsanalyse-bar-row__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    color: #1e293b;
    font-weight: 700;
}

.mhp-haushaltsanalyse-bar-row__head strong {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.mhp-haushaltsanalyse-bar {
    height: 9px;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.92);
    overflow: hidden;
    margin: 0.4rem 0 0.25rem;
}

.mhp-haushaltsanalyse-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0d9488 0%, #1d4ed8 100%);
}

.mhp-haushaltsanalyse-bar--expense span {
    background: linear-gradient(90deg, #f59e0b 0%, #dc2626 100%);
}

.mhp-haushaltsanalyse-task,
.mhp-haushaltsanalyse-investment {
    padding: 1rem;
}

.mhp-haushaltsanalyse-task .mud-typography-h6 {
    color: #0f172a !important;
    font-weight: 800 !important;
}

.mhp-haushaltsanalyse-investment {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.mhp-haushaltsanalyse-trend {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.mhp-haushaltsanalyse-trend__year {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    padding: 0.85rem;
    background: #ffffff;
}

.mhp-haushaltsanalyse-trend__year span,
.mhp-haushaltsanalyse-fact span {
    display: block;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.055em;
}

.mhp-haushaltsanalyse-trend__year strong,
.mhp-haushaltsanalyse-trend__year em,
.mhp-haushaltsanalyse-fact strong {
    display: block;
    color: #0f172a;
    font-weight: 800;
    font-style: normal;
    font-variant-numeric: tabular-nums;
}

.mhp-haushaltsanalyse-trend__year small,
.mhp-haushaltsanalyse-fact small {
    display: block;
    color: #64748b;
    line-height: 1.35;
}

.mhp-haushaltsanalyse-trend__year--critical {
    border-color: rgba(220, 38, 38, 0.28);
    background: rgba(254, 242, 242, 0.72);
}

.mhp-haushaltsanalyse-fact {
    padding: 0.85rem 0.95rem;
}

.mhp-haushaltsanalyse-risk {
    display: flex;
    gap: 0.85rem;
    padding: 1rem;
}

.mhp-haushaltsanalyse-risk__icon {
    flex: 0 0 auto;
    margin-bottom: 0;
}

.mhp-haushaltsanalyse-execution {
    border-color: rgba(37, 99, 235, 0.22) !important;
    background: linear-gradient(180deg, #ffffff 0%, rgba(239, 246, 255, 0.48) 100%) !important;
}

.mhp-haushaltsanalyse-system-kpi {
    padding: 0.9rem 1rem;
}

.mhp-haushaltsanalyse-system-kpi .mud-typography-caption {
    color: #475569;
    font-weight: 750;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.mhp-haushaltsanalyse-system-kpi .mud-typography-h5 {
    font-weight: 800;
    color: #0f172a;
}

@media (max-width: 900px) {
    .mhp-haushaltsanalyse-trend {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .mhp-haushaltsanalyse-trend {
        grid-template-columns: 1fr;
    }

    .mhp-haushaltsanalyse-bar-row__head {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.2rem;
    }
}

/* Auth-Diagnose: kompakte Key/Value-Zeile */
.mhp-kvline {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
    padding: 2px 0;
}

.mhp-kvline__label {
    min-width: 220px;
    color: #64748b;
    font-size: 0.85rem;
}

.mhp-kvline__value code {
    word-break: break-all;
}

/* Statischer Boot-Hinweis bis Blazor die Shell rendert (prerender: false). */
.mhp-app-boot {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
    background: var(--mhp-bg, #f9fafb);
    color: var(--mhp-text, #111827);
    font-family: "Segoe UI", Inter, system-ui, -apple-system, Arial, sans-serif;
    pointer-events: none;
}

.mhp-route-authorizing {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 2rem;
    background: var(--mhp-bg, #f9fafb);
    font-family: "Segoe UI", Inter, system-ui, -apple-system, Arial, sans-serif;
}

.mhp-route-authorizing__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--mhp-text, #111827);
}

.mhp-route-authorizing__hint {
    margin: 0;
    font-size: 0.875rem;
    color: var(--mhp-muted, #6b7280);
}

.mhp-app-boot__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--mhp-primary-dark, #1e3a8a);
}

.mhp-app-boot__text {
    margin: 0;
    font-size: 0.95rem;
    color: var(--mhp-muted, #6b7280);
}

/* Akademie – Schulungsvideo-Kacheln */
.mhp-academy-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.mhp-academy-search-field {
    flex: 1 1 240px;
    min-width: 200px;
    max-width: 420px;
}

.mhp-academy-grid {
    margin-top: 4px;
}

.mhp-academy-card {
    height: 100%;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 18px;
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.mhp-academy-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, .08);
    border-color: rgba(37, 99, 235, .35);
}

.mhp-academy-card-preview {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 18px 18px 0 0;
    background: #eef3ff;
}

.mhp-academy-card-preview:not(.mhp-academy-card-preview-image) {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(37, 99, 235, .12), rgba(37, 99, 235, .04));
}

.mhp-academy-card-preview .mud-icon-root {
    font-size: 52px;
    color: var(--mud-palette-primary);
}

.mhp-academy-card-preview-image {
    padding: 0;
    display: block;
}

.mhp-academy-thumbnail {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.mhp-academy-admin-thumbnail {
    width: 72px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.mhp-academy-card-badge-type {
    position: absolute;
    left: 10px;
    bottom: 10px;
}

.mhp-academy-card-badge-category {
    position: absolute;
    top: 10px;
    right: 10px;
}

.mhp-academy-title {
    font-weight: 700;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.5em;
}

.mhp-academy-description {
    color: var(--mud-palette-text-secondary);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.6em;
}

.mhp-academy-meta {
    font-size: .82rem;
    color: var(--mud-palette-text-secondary);
}

.mhp-academy-video-player {
    width: 100%;
    max-height: 70vh;
    border-radius: 14px;
    background: #000;
}

.mhp-academy-empty {
    border-radius: 18px;
    background: linear-gradient(180deg, #fff 0%, rgba(239, 246, 255, .35) 100%);
}

.mhp-academy-header {
    border-radius: 18px;
    background: linear-gradient(180deg, #fff 0%, rgba(239, 246, 255, .4) 100%);
}

.mhp-academy-toolbar-paper {
    border-radius: 14px;
}

.mhp-beleg-invoice-dialog .mhp-beleg-preview-panel {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    min-height: 12rem;
}

.mhp-beleg-invoice-dialog .mhp-beleg-preview-frame {
    width: 100%;
    min-height: 400px;
    max-height: 650px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    background: var(--mud-palette-background);
}

.mhp-beleg-invoice-dialog .mhp-beleg-preview-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    max-height: 650px;
    padding: 1rem;
    border: 1px dashed var(--mud-palette-lines-default);
    border-radius: 8px;
    text-align: center;
}

.mhp-beleg-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem;
    border: 1px dashed var(--mud-palette-lines-default);
    border-radius: 8px;
    background: var(--mud-palette-background);
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    text-align: center;
    margin: 0;
}

.mhp-beleg-dropzone > * {
    pointer-events: none;
}

.mhp-beleg-dropzone:hover:not(.mhp-beleg-dropzone--disabled) {
    border-color: var(--mud-palette-primary);
    background: var(--mud-palette-background-grey);
}

.mhp-beleg-dropzone--active {
    border-color: var(--mud-palette-primary);
    background: var(--mud-palette-action-default-hover);
}

.mhp-beleg-dropzone--disabled {
    opacity: 0.65;
    pointer-events: none;
    cursor: default;
}

.mhp-beleg-dropzone-icon {
    color: var(--mud-palette-primary);
    font-size: 2rem;
}

.mhp-beleg-upload-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mhp-beleg-re-ist-summary {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    background: var(--mud-palette-background-grey);
}

.mhp-beleg-re-ist-amount {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.mhp-council-home-status {
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
}

.mhp-council-home-grid .mhp-council-home-card {
    height: 100%;
    border-radius: 16px;
    background: #ffffff;
}

.mhp-council-home-card .mud-button-root {
    min-height: 48px;
    font-weight: 600;
}

.mhp-council-home-empty {
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.mhp-council-hannes {
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
    border-color: #c5d9f5;
}

.mhp-council-hannes__avatar {
    width: 52px;
    height: 52px;
}

.mhp-council-hannes__greeting {
    line-height: 1.55;
    max-width: 52rem;
}

/* Hannes: natives Chat-Eingabefeld (volle Breite, kein MudTextField) */
.mhp-council-hannes .mhp-hannes-chat-input {
    width: 100%;
    max-width: 100%;
    align-self: stretch;
}

.mhp-council-hannes__chat-input-host {
    width: 100%;
    max-width: 100%;
    align-self: stretch;
}

.mhp-hannes-chat-input {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    box-sizing: border-box;
}

.mhp-hannes-chat-input__label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #4b5563;
    margin: 0;
    line-height: 1.35;
}

.mhp-hannes-chat-input__textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 96px;
    resize: vertical;
    border: 1px solid #cfd7e6;
    border-radius: 12px;
    padding: 14px 16px;
    font: inherit;
    font-size: 1rem;
    line-height: 1.45;
    background: #fff;
    color: #111827;
    outline: none;
    box-sizing: border-box;
    margin: 0;
}

.mhp-hannes-chat-input__textarea:focus {
    border-color: #3467eb;
    box-shadow: 0 0 0 3px rgba(52, 103, 235, 0.14);
}

.mhp-hannes-chat-input__textarea:disabled {
    background: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
}

.mhp-hannes-chat-input__textarea::placeholder {
    color: #8a94a6;
    opacity: 1;
}

.mhp-hannes-chat-input__hint {
    font-size: 0.8rem;
    line-height: 1.4;
    color: #6b7280;
    margin: 0;
}

.mhp-hannes-chat-input__submit.mud-button-root,
.mhp-hannes-chat-input__submit {
    width: 100%;
    min-height: 52px;
    font-weight: 600;
    font-size: 1rem;
    margin-top: 0.15rem;
}

@media (max-width: 600px) {
    .mhp-hannes-chat-input__textarea {
        min-height: 88px;
        padding: 12px 14px;
        border-radius: 10px;
    }

    .mhp-hannes-chat-input__submit.mud-button-root,
    .mhp-hannes-chat-input__submit {
        min-height: 48px;
        font-size: 0.95rem;
    }
}

.mhp-council-hannes__topic-clarification {
    border-radius: 14px;
    background: #ffffff;
    border-color: #c5d9f5;
}

.mhp-council-hannes__topic-clarification-title {
    font-weight: 600;
    color: #0f172a;
}

.mhp-council-hannes__topic-option.mud-button-root {
    justify-content: flex-start;
    min-height: 52px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
    border-radius: 12px;
    padding: 12px 16px;
}

.mhp-council-hannes__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.mhp-council-hannes__chip {
    cursor: pointer;
    min-height: 40px;
    font-size: 0.95rem;
}

.mhp-council-hannes__answer-card {
    border-radius: 14px;
    background: #ffffff;
    border-color: #d7e3f4;
}

.mhp-council-hannes__main-answer {
    max-width: 42rem;
}

.mhp-council-hannes__intro {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #1e293b;
}

.mhp-council-hannes__amount-highlight {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.75rem;
    margin: 0.25rem 0 0.5rem;
}

.mhp-council-hannes__amount-value {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    line-height: 1.15;
    color: #0f4c9a;
    letter-spacing: -0.02em;
}

.mhp-council-hannes__amount-suffix {
    font-size: 1.25rem;
    font-weight: 600;
    color: #334155;
}

.mhp-council-hannes__section-lead {
    font-weight: 600;
    color: #0f172a;
    margin-top: 0.25rem;
}

.mhp-council-hannes__detail-table {
    font-size: 1rem;
}

.mhp-council-hannes__detail-table th {
    font-weight: 600;
    background: #f1f5f9;
}

.mhp-council-hannes__amount-col {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.mhp-council-hannes__details-sum {
    font-weight: 600;
    color: #1e3a5f;
    margin-top: 0.25rem;
}

.mhp-council-hannes__remainder-box {
    border-radius: 12px;
    border-color: #f0d59a !important;
    background: #fffbeb;
}

.mhp-council-hannes__remainder-title {
    font-weight: 600;
    color: #92400e;
}

.mhp-council-hannes__no-details-box {
    border-radius: 12px;
    border-color: #dbeafe !important;
    background: #f8fafc;
}

.mhp-council-hannes__facts {
    border-radius: 12px;
    background: #f8fafc;
    border-color: #dbeafe !important;
    height: 100%;
}

.mhp-council-hannes__facts-title {
    font-weight: 700;
    color: #0f4c9a;
}

.mhp-council-hannes__fact-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.95rem;
    line-height: 1.45;
    padding: 0.2rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.mhp-council-hannes__fact-row:last-child {
    border-bottom: none;
}

.mhp-council-hannes__sources {
    margin-top: 0.5rem;
}

.mhp-council-hannes__sources-summary {
    flex: 1 1 16rem;
    line-height: 1.5;
}

.mhp-council-hannes__security-hint {
    line-height: 1.5;
    max-width: 52rem;
}

.mhp-council-hannes__no-answer {
    font-size: 1.05rem;
    line-height: 1.55;
}

@media (max-width: 600px) {
    .mhp-council-hannes__chip {
        width: 100%;
        justify-content: flex-start;
    }
}

.mhp-ratsfassung-workspace__header {
    gap: 1rem;
}

.mhp-ratsfassung-workspace__actions {
    justify-content: flex-end;
}

.mhp-ratsfassung-workspace__tile {
    cursor: pointer;
    border-radius: 12px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    height: 100%;
}

.mhp-ratsfassung-workspace__tile:hover {
    border-color: #93c5fd;
    box-shadow: 0 2px 8px rgba(15, 76, 154, 0.12);
}

.mhp-ratsfassung-workspace__tile--active {
    border-color: #2563eb !important;
    background: #eff6ff;
    box-shadow: 0 0 0 1px #2563eb;
}

.mhp-ratsfassung-workspace__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.mhp-ratsfassung-workspace__chips--dense .mud-chip {
    margin: 0;
}

.mhp-ratsfassung-workspace__note-preview {
    display: block;
    max-width: 280px;
    line-height: 1.4;
    color: #334155;
}

.mhp-ratsfassung-workspace__row {
    cursor: pointer;
}

.mhp-ratsfassung-workspace__table .mud-table-row:hover {
    background: #f8fafc;
}

.mhp-ratsfassung-drawer__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

.mhp-ratsfassung-edit-dialog__content {
    max-height: min(72vh, 760px);
    overflow-y: auto;
    padding-right: 0.25rem;
}

.mhp-ratsfassung-edit-dialog__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.mhp-ratsfassung-drawer__fact {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.95rem;
    padding: 0.2rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.mhp-ratsfassung-panel-internal {
    background: #f1f5f9;
    border-color: #cbd5e1 !important;
}

.mhp-ratsfassung-panel-public {
    background: #ecfdf5;
    border-color: #86efac !important;
}

.mhp-ratsfassung-council-preview {
    background: #ffffff;
    border-color: #dbeafe !important;
}

.mhp-ratsfassung-table-wrap {
    overflow-x: auto;
    max-width: 100%;
}

.mhp-ratsfassung-table-wrap .mud-table-root {
    min-width: 1200px;
}

.mhp-ratsfassung-detail-row td {
    background: var(--mud-palette-background-grey);
}
