/* Hirsch Manager – Tabler Overrides & Custom Variables */

@keyframes hm-icon-spin {
    to {
        transform: rotate(360deg);
    }
}

.hm-icon-spin {
    animation: hm-icon-spin 0.8s linear infinite;
    display: inline-block;
}

@media (prefers-reduced-motion: reduce) {
    .hm-icon-spin {
        animation: none;
    }
}

@font-face {
    font-family: 'Bebas Neue';
    src: url('../publication-web-resources/font/BebasNeue Regular_1.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: 'Bebas Neue';
    src: url('../publication-web-resources/font/BebasNeue Bold_0.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: block;
}

:root,
[data-bs-theme="light"] {
    --hm-brand: var(--hm-accent-600, #2563eb);
    --hm-brand-hover: var(--hm-accent-700, #1d4ed8);
    --hm-sidebar-bg: #f8fafc;
    --hm-sidebar-border: #e2e8f0;
    --hm-text-muted: #64748b;
    --hm-sidebar-link: #1e293b;
    --hm-sidebar-link-hover: #0f172a;
    --hm-sidebar-heading: #64748b;
    --hm-topbar-bg: rgba(248, 250, 252, 0.92);
    --hm-topbar-bg-solid: #f8fafc;
    --hm-topbar-border: #e2e8f0;
    --hm-page-bg: #f1f5f9;
    --hm-sidebar-width: 15rem;
    --hm-sidebar-collapsed-width: 4.25rem;
    --hm-sidebar-border-width: 1px;
    --hm-sidebar-brand-image-size: 30px;
    --hm-sidebar-brand-text-gap: 0.75rem;
    --hm-page-content-padding-x: clamp(0.75rem, 1.8vw, 1.75rem);
    --hm-sidebar-icon-size: 18px;
    --hm-sidebar-icon-gap: 0.75rem;
    --hm-sidebar-row-height: 2.35rem;
}

[data-bs-theme="dark"] {
    --hm-brand: var(--hm-accent-500, #3b82f6);
    --hm-brand-hover: #60a5fa;
    --hm-sidebar-bg: #1a2234;
    --hm-sidebar-border: #2d3a4e;
    --hm-text-muted: #94a3b8;
    --hm-sidebar-link: #e2e8f0;
    --hm-sidebar-link-hover: #f8fafc;
    --hm-sidebar-heading: #94a3b8;
    --hm-topbar-bg: rgba(26, 34, 52, 0.92);
    --hm-topbar-bg-solid: #1a2234;
    --hm-topbar-border: #2d3a4e;
    --hm-page-bg: #0f172a;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.navbar-vertical {
    background: var(--hm-sidebar-bg);
    border-right: 1px solid var(--hm-sidebar-border);
    width: var(--hm-sidebar-width);
    transition: width 0.2s ease;
}

.page>.navbar-vertical .navbar-nav .nav-item .nav-link:not(.hm-subnav-link) {
    position: relative;
    display: flex;
    align-items: center;
    border-radius: 6px;
    margin: 1px 0;
    height: var(--hm-sidebar-row-height);
    min-height: var(--hm-sidebar-row-height);
    padding-top: 0;
    padding-bottom: 0;
    padding-left: calc(((var(--hm-sidebar-collapsed-width) - var(--hm-sidebar-border-width)) / 2) + (var(--hm-sidebar-icon-size) / 2) + var(--hm-sidebar-icon-gap));
    font-size: 0.875rem;
    color: var(--hm-sidebar-link);
}

.navbar-vertical .nav-link:hover {
    background: rgba(var(--tblr-primary-rgb), 0.08);
    color: var(--hm-sidebar-link-hover);
}

.navbar-vertical .nav-link.active {
    background: rgba(var(--tblr-primary-rgb), 0.12);
    color: var(--hm-brand);
    font-weight: 600;
}

.navbar-brand-image {
    object-fit: contain;
}

[data-bs-theme="light"] .navbar-brand-image {
    filter: none !important;
}

.page-body {
    padding-top: 0;
}

html {
    transition: background-color 0.2s ease, color 0.2s ease;
}

.hm-sidebar-brand {
    display: flex;
    align-items: center;
    height: 3.5rem;
    padding: 0 0.75rem;
    margin-bottom: 0.5rem;
    position: relative;
    box-sizing: border-box;
}

.hm-sidebar-brand::after {
    content: '';
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0;
    border-top: 1px solid var(--hm-sidebar-border);
    opacity: 0.9;
}

.hm-sidebar-context {
    margin: 0.15rem 0.75rem 0.55rem 0.75rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--hm-sidebar-border);
    border-radius: 0.65rem;
    background: rgba(var(--tblr-primary-rgb), 0.06);
}

.hm-sidebar-context-value {
    font-size: 0.89rem;
    font-weight: 700;
    color: var(--hm-sidebar-link);
    line-height: 1.35;
    letter-spacing: 0.01em;
    word-break: break-word;
}

.hm-sidebar-brand-link {
    width: 100%;
    min-width: 0;
}

.hm-sidebar-brand-image,
.hm-topbar-brand-image {
    height: var(--hm-sidebar-brand-image-size);
    width: var(--hm-sidebar-brand-image-size);
    flex: 0 0 var(--hm-sidebar-brand-image-size);
    object-fit: contain;
    transition: filter 0.2s ease;
}

.hm-sidebar-brand-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--hm-sidebar-link);
    letter-spacing: 0.02em;
    white-space: nowrap;
    line-height: 1;
    margin-top: 2px;
}

.hm-sidebar-divider {
    list-style: none;
    margin: 0;
    border-top: 0;
    opacity: 0.9;
    display: none;
    min-height: var(--hm-sidebar-row-height);
    height: var(--hm-sidebar-row-height);
    position: relative;
}

.hm-sidebar-divider::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    top: 50%;
    border-top: 1px solid var(--hm-sidebar-border);
    transform: translateY(-50%);
}

.hm-sidebar-section-label {
    margin: 0;
    min-height: var(--hm-sidebar-row-height);
    height: var(--hm-sidebar-row-height);
    display: flex;
    align-items: center;
    position: relative;
}

.hm-sidebar-section-label .nav-link-title {
    margin: 0;
    width: 100%;
    padding-left: 0.75rem !important;
}

.hm-topbar-clock-menu {
    min-width: 15rem;
    border: 1px solid var(--hm-sidebar-border);
    border-radius: 0.9rem;
    background: var(--tblr-bg-surface);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
    overflow: visible;
}

.hm-topbar-clock-widget {
    padding: 0.85rem 0.9rem;
    background: linear-gradient(180deg, rgba(var(--tblr-primary-rgb), 0.08), rgba(var(--tblr-primary-rgb), 0.03));
    border-radius: inherit;
}

.hm-topbar-clock-label {
    margin-bottom: 0.35rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hm-text-muted);
}

.hm-topbar-clock-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.hm-topbar-clock-date {
    min-width: 0;
    font-size: 0.76rem;
    color: var(--hm-text-muted);
    line-height: 1.35;
}

.hm-topbar-clock-week {
    flex-shrink: 0;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    background: rgba(var(--tblr-primary-rgb), 0.12);
    color: var(--hm-brand);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    cursor: default;
    outline: none;
}

.hm-topbar-clock-week-wrap {
    position: relative;
    flex-shrink: 0;
}

.hm-topbar-clock-week-wrap:hover .hm-topbar-week-calendar,
.hm-topbar-clock-week-wrap:focus-within .hm-topbar-week-calendar {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.hm-topbar-clock-week-wrap:hover .hm-topbar-clock-week,
.hm-topbar-clock-week-wrap:focus-within .hm-topbar-clock-week {
    background: rgba(var(--tblr-primary-rgb), 0.18);
    color: var(--hm-brand-hover);
}

.hm-topbar-week-calendar {
    position: absolute;
    right: 0;
    top: calc(100% + 0.55rem);
    z-index: 1080;
    width: min(68rem, calc(100vw - 1.5rem));
    padding: 0.8rem;
    border: 1px solid var(--hm-sidebar-border);
    border-radius: 0.95rem;
    background: var(--tblr-bg-surface);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(0.35rem);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.hm-topbar-week-calendar-header {
    margin-bottom: 0.7rem;
}

.hm-topbar-week-calendar-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.6rem;
}

.hm-topbar-week-calendar-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--hm-sidebar-link);
}

.hm-topbar-week-calendar-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.hm-topbar-week-nav {
    min-height: 1.7rem;
    padding: 0.12rem 0.52rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
    text-transform: lowercase;
}

.hm-topbar-week-calendar-subtitle {
    margin-top: 0.15rem;
    font-size: 0.72rem;
    color: var(--hm-text-muted);
}

.hm-topbar-week-calendar-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 0.35rem;
}

.hm-topbar-week-chip {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.35rem 0.4rem;
    border: 1px solid rgba(var(--tblr-primary-rgb), 0.08);
    border-radius: 0.75rem;
    background: rgba(var(--tblr-primary-rgb), 0.04);
    text-align: center;
}

.hm-topbar-week-chip-month {
    font-size: 0.61rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--hm-brand);
    text-transform: capitalize;
}

.hm-topbar-week-chip-label {
    font-size: 0.69rem;
    font-weight: 700;
    color: var(--hm-sidebar-link);
}

.hm-topbar-week-chip-range {
    font-size: 0.6rem;
    line-height: 1.2;
    color: var(--hm-text-muted);
}

.hm-topbar-week-chip.is-current {
    border-color: rgba(var(--tblr-primary-rgb), 0.34);
    background: rgba(var(--tblr-primary-rgb), 0.14);
    box-shadow: inset 0 0 0 1px rgba(var(--tblr-primary-rgb), 0.14);
}

.hm-topbar-week-chip.is-current .hm-topbar-week-chip-label {
    color: var(--hm-brand);
}

[data-bs-theme="dark"] .hm-topbar-clock-menu {
    box-shadow: 0 18px 36px rgba(2, 6, 23, 0.42);
}

[data-bs-theme="dark"] .hm-topbar-week-calendar {
    box-shadow: 0 22px 44px rgba(2, 6, 23, 0.52);
}

@media (max-width: 1399.98px) {
    .hm-topbar-week-calendar {
        width: min(58rem, calc(100vw - 1.5rem));
    }

    .hm-topbar-week-calendar-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .hm-topbar-week-calendar {
        right: -0.5rem;
        width: min(42rem, calc(100vw - 1rem));
    }

    .hm-topbar-week-calendar-header-top {
        align-items: stretch;
        flex-direction: column;
    }

    .hm-topbar-week-calendar-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .hm-topbar-week-calendar {
        width: min(24rem, calc(100vw - 1rem));
    }

    .hm-topbar-week-calendar-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

[data-bs-theme="dark"] .hm-sidebar-brand-image,
[data-bs-theme="dark"] .hm-topbar-brand-image {
    filter: brightness(0) invert(1);
}

[data-bs-theme="light"] .hm-sidebar-brand-image,
[data-bs-theme="light"] .hm-topbar-brand-image {
    filter: none;
}

.navbar-vertical .form-label {
    color: var(--hm-sidebar-heading) !important;
}

.navbar-vertical .form-select {
    background: var(--tblr-bg-surface);
    color: var(--hm-sidebar-link);
    border-color: var(--hm-sidebar-border);
}

.hm-topbar-inner {
    padding-left: var(--hm-page-content-padding-x);
    padding-right: var(--hm-page-content-padding-x);
}

.hm-top-context-wrap {
    position: relative;
    width: min(100%, 26rem);
    max-width: 26rem;
}

.hm-top-context-select {
    font-size: 0.875rem;
    font-weight: 400;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none !important;
}

.hm-top-context-select::-ms-expand {
    display: none;
}

@media (max-width: 1199.98px) {
    .hm-top-context-wrap {
        max-width: 22rem;
    }
}

.navbar-vertical hr {
    border-color: var(--hm-sidebar-border);
}

.page>.navbar-vertical .navbar-nav .nav-link:not(.hm-subnav-link) .nav-link-icon {
    position: absolute;
    left: calc((var(--hm-sidebar-collapsed-width) - var(--hm-sidebar-border-width)) / 2);
    top: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--hm-sidebar-icon-size);
    height: var(--hm-sidebar-icon-size);
    font-size: var(--hm-sidebar-icon-size) !important;
    margin-right: 0 !important;
    margin-inline-end: 0 !important;
    color: currentColor;
    opacity: 0.9;
}

.page>.navbar-vertical .navbar-nav .nav-link:not(.hm-subnav-link) .nav-link-icon i {
    font-size: var(--hm-sidebar-icon-size) !important;
    line-height: 1 !important;
}

.hm-nav-group-row {
    align-items: center;
}

.hm-nav-group-row>.nav-link {
    margin-right: 0;
}

.hm-nav-toggle {
    margin-right: 8px;
    min-width: 1.8rem;
    height: 1.8rem;
    padding: 0;
    color: var(--hm-text-muted);
}

.hm-nav-toggle:hover {
    color: var(--hm-sidebar-link-hover);
}

html,
body {
    height: 100%;
}

body.layout-fluid {
    overflow: hidden;
}

.page {
    height: 100vh;
    min-height: 100vh;
}

.page-wrapper {
    height: 100vh;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    overscroll-behavior: contain;
    background: var(--hm-page-bg);
}

.page-body {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: auto;
    background: var(--hm-page-bg);
}

.page-body>.container-fluid {
    max-width: none;
    min-height: 100%;
    padding-left: var(--hm-page-content-padding-x);
    padding-right: var(--hm-page-content-padding-x);
}

.page-body>.container-fluid>.container>.nav.nav-tabs:not(.card-header-tabs),
.page-body>.container-fluid>.container-sm>.nav.nav-tabs:not(.card-header-tabs),
.page-body>.container-fluid>.container-md>.nav.nav-tabs:not(.card-header-tabs),
.page-body>.container-fluid>.container-lg>.nav.nav-tabs:not(.card-header-tabs),
.page-body>.container-fluid>.container-xl>.nav.nav-tabs:not(.card-header-tabs),
.page-body>.container-fluid>.container-xxl>.nav.nav-tabs:not(.card-header-tabs),
.page-body>.container-fluid>.container-fluid>.nav.nav-tabs:not(.card-header-tabs) {
    position: sticky;
    top: 0;
    z-index: 80;
    margin-left: calc(-1 * var(--hm-page-content-padding-x));
    margin-right: calc(-1 * var(--hm-page-content-padding-x));
    padding-top: .5rem;
    padding-left: var(--hm-page-content-padding-x);
    padding-right: var(--hm-page-content-padding-x);
    background: var(--hm-page-bg);
}


/* Normalize inner Bootstrap containers so all app pages keep the same horizontal gutter. */
.page-body>.container-fluid>.container,
.page-body>.container-fluid>.container-sm,
.page-body>.container-fluid>.container-md,
.page-body>.container-fluid>.container-lg,
.page-body>.container-fluid>.container-xl,
.page-body>.container-fluid>.container-xxl,
.page-body>.container-fluid>.container-fluid,
.hm-page-header-standard>.container,
.hm-page-header-standard>.container-sm,
.hm-page-header-standard>.container-md,
.hm-page-header-standard>.container-lg,
.hm-page-header-standard>.container-xl,
.hm-page-header-standard>.container-xxl,
.hm-page-header-standard>.container-fluid {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
}

.hm-wizard-page .page-body {
    padding: 0;
    overflow: hidden;
}

.hm-wizard-page .page-body>.container-fluid {
    padding-left: 0;
    padding-right: 0;
    height: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@supports (height: 100dvh) {
    .page {
        height: 100dvh;
        min-height: 100dvh;
    }

    .page-wrapper {
        height: 100dvh;
        min-height: 100dvh;
    }
}

@media (min-width: 992px) {
    .page>.navbar-vertical {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 1031;
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-gutter: stable;
    }

    .page>.page-wrapper {
        margin-left: var(--hm-sidebar-width);
        width: calc(100% - var(--hm-sidebar-width));
        transition: margin-left 0.2s ease, width 0.2s ease;
    }

    .page>.navbar-vertical>.container-fluid {
        display: flex;
        flex-direction: column;
        min-height: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    .page>.navbar-vertical .navbar-collapse {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        flex: 1 1 auto;
        min-height: 100%;
    }

    .page>.navbar-vertical .hm-sidebar-brand {
        padding-left: 0;
        padding-right: 0;
    }

    .page>.navbar-vertical .hm-sidebar-brand-link {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        min-height: 3.5rem;
    }

    .page>.navbar-vertical .hm-sidebar-brand .hm-sidebar-brand-image {
        position: absolute;
        left: calc((var(--hm-sidebar-collapsed-width) - var(--hm-sidebar-border-width)) / 2);
        top: 50%;
        transform: translate(-50%, -50%);
        margin-right: 0 !important;
        margin-left: 0 !important;
    }

    .page>.navbar-vertical .hm-sidebar-brand-text {
        margin-left: calc(((var(--hm-sidebar-collapsed-width) - var(--hm-sidebar-border-width)) / 2) + (var(--hm-sidebar-brand-image-size) / 2) + var(--hm-sidebar-brand-text-gap));
    }

    body.hm-sidebar-collapsed .page>.navbar-vertical,
    html.hm-sidebar-pref-collapsed body .page>.navbar-vertical {
        width: var(--hm-sidebar-collapsed-width);
        scrollbar-gutter: auto;
    }

    body.hm-sidebar-collapsed .page>.page-wrapper,
    html.hm-sidebar-pref-collapsed body .page>.page-wrapper {
        margin-left: var(--hm-sidebar-collapsed-width);
        width: calc(100% - var(--hm-sidebar-collapsed-width));
    }

    body.hm-sidebar-collapsed .page>.navbar-vertical .hm-sidebar-brand-text,
    body.hm-sidebar-collapsed .hm-sidebar-context,
    body.hm-sidebar-collapsed .navbar-vertical .nav-link-title,
    body.hm-sidebar-collapsed .hm-nav-toggle,
    body.hm-sidebar-collapsed .navbar-vertical .hm-subnav,
    body.hm-sidebar-collapsed .navbar-vertical .text-uppercase.nav-link-title,
    html.hm-sidebar-pref-collapsed body .page>.navbar-vertical .hm-sidebar-brand-text,
    html.hm-sidebar-pref-collapsed body .hm-sidebar-context,
    html.hm-sidebar-pref-collapsed body .navbar-vertical .nav-link-title,
    html.hm-sidebar-pref-collapsed body .hm-nav-toggle,
    html.hm-sidebar-pref-collapsed body .navbar-vertical .hm-subnav,
    html.hm-sidebar-pref-collapsed body .navbar-vertical .text-uppercase.nav-link-title {
        display: none !important;
    }

    body.hm-sidebar-collapsed .page>.navbar-vertical .navbar-nav,
    html.hm-sidebar-pref-collapsed body .page>.navbar-vertical .navbar-nav {
        width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    body.hm-sidebar-collapsed .page>.navbar-vertical .navbar-nav .nav-item,
    html.hm-sidebar-pref-collapsed body .page>.navbar-vertical .navbar-nav .nav-item {
        width: 100% !important;
    }

    body.hm-sidebar-collapsed .page>.navbar-vertical .navbar-nav .nav-item .nav-link:not(.hm-subnav-link),
    html.hm-sidebar-pref-collapsed body .page>.navbar-vertical .navbar-nav .nav-item .nav-link:not(.hm-subnav-link) {
        display: flex !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        height: var(--hm-sidebar-row-height);
        min-height: var(--hm-sidebar-row-height);
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    body.hm-sidebar-collapsed .page>.navbar-vertical .navbar-nav .nav-item .nav-link:not(.hm-subnav-link) .nav-link-icon,
    html.hm-sidebar-pref-collapsed body .page>.navbar-vertical .navbar-nav .nav-item .nav-link:not(.hm-subnav-link) .nav-link-icon {
        display: inline-flex !important;
        width: var(--hm-sidebar-icon-size) !important;
        height: var(--hm-sidebar-icon-size) !important;
        align-items: center !important;
        justify-content: center !important;
        left: calc((var(--hm-sidebar-collapsed-width) - var(--hm-sidebar-border-width)) / 2) !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        position: absolute !important;
        margin-right: 0 !important;
        margin-inline-end: 0 !important;
    }

    body.hm-sidebar-collapsed .page>.navbar-vertical>.container-fluid,
    html.hm-sidebar-pref-collapsed body .page>.navbar-vertical>.container-fluid {
        padding-left: 0;
        padding-right: 0;
    }

    body.hm-sidebar-collapsed .hm-sidebar-brand,
    html.hm-sidebar-pref-collapsed body .hm-sidebar-brand {
        justify-content: flex-start;
    }

    body.hm-sidebar-collapsed .hm-sidebar-brand-link,
    html.hm-sidebar-pref-collapsed body .hm-sidebar-brand-link {
        justify-content: flex-start;
    }

    body.hm-sidebar-collapsed .hm-sidebar-brand::after,
    html.hm-sidebar-pref-collapsed body .hm-sidebar-brand::after {
        left: 0.5rem;
        right: 0.5rem;
    }

    body.hm-sidebar-collapsed .hm-sidebar-section-label,
    html.hm-sidebar-pref-collapsed body .hm-sidebar-section-label {
        display: flex !important;
        align-items: center !important;
        min-height: var(--hm-sidebar-row-height) !important;
        height: var(--hm-sidebar-row-height) !important;
        margin: 0 !important;
        pointer-events: none;
    }

    body.hm-sidebar-collapsed .hm-sidebar-section-label::before,
    html.hm-sidebar-pref-collapsed body .hm-sidebar-section-label::before {
        content: '';
        position: absolute;
        left: 0.5rem;
        right: 0.5rem;
        top: 50%;
        border-top: 1px solid var(--hm-sidebar-border);
        transform: translateY(-50%);
        opacity: 0.9;
    }

    body.hm-sidebar-collapsed .hm-sidebar-divider,
    html.hm-sidebar-pref-collapsed body .hm-sidebar-divider {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    .page>.navbar-vertical {
        width: 0;
        min-width: 0;
        height: 0;
        min-height: 0;
        border: 0;
        background: transparent;
    }

    .page>.navbar-vertical>.container-fluid {
        padding: 0;
    }

    .page>.navbar-vertical .navbar-collapse {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 1045;
        width: min(19.5rem, calc(100vw - 2.25rem));
        max-width: calc(100vw - 2.25rem);
        height: 100vh;
        min-height: 100vh;
        padding: 0 0.75rem 1rem;
        overflow-y: auto;
        overflow-x: hidden;
        background: var(--hm-sidebar-bg);
        border-right: 1px solid var(--hm-sidebar-border);
        box-shadow: 0 1rem 2.5rem rgba(2, 6, 23, 0.34);
        scrollbar-gutter: stable;
    }

    @supports (height: 100dvh) {
        .page>.navbar-vertical .navbar-collapse {
            height: 100dvh;
            min-height: 100dvh;
        }
    }

    .page>.navbar-vertical .navbar-collapse.show,
    .page>.navbar-vertical .navbar-collapse.collapsing {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .page>.navbar-vertical .navbar-collapse.collapsing {
        transition: none;
    }

    .page>.navbar-vertical .hm-sidebar-brand {
        flex: 0 0 auto;
        padding-left: 0;
        padding-right: 0;
    }

    .page>.navbar-vertical .navbar-nav {
        flex: 0 0 auto;
        width: 100%;
    }

    .page>.page-wrapper {
        width: 100%;
        min-width: 0;
    }
}

.page-wrapper>.navbar.navbar-expand-md {
    transform: translateZ(0);
    backface-visibility: hidden;
    position: sticky;
    top: 0;
    z-index: 1030;
    height: 3.5rem;
    padding: 0;
    background: var(--hm-topbar-bg) !important;
    border-bottom: none;
    box-shadow: none !important;
    -webkit-backdrop-filter: saturate(180%) blur(8px);
    backdrop-filter: saturate(180%) blur(8px);
}

.page-wrapper>.navbar.navbar-expand-md .container-fluid {
    height: 3.5rem;
    display: flex;
    align-items: center;
}

.page-wrapper>.navbar.navbar-expand-md .dropdown-menu {
    z-index: 1040;
}

@supports not ((backdrop-filter: blur(1px))) {
    .page-wrapper>.navbar.navbar-expand-md {
        background: var(--hm-topbar-bg-solid) !important;
    }
}

.hm-table-card .card-header {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.hm-table-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hm-table-toolbar>* {
    min-width: 0;
}

.hm-table {
    margin-bottom: 0;
}

/* Table cards: keep border/radius clean across pages (e.g. Protokolle, Feedback) */
.card>.table-responsive,
.card>.card-body>.table-responsive {
    overflow: hidden;
}

/* Header-less cards need full top bevel from card radius. */
.card>.table-responsive,
.card>.card-body>.table-responsive {
    border-top: 0;
    border-radius: var(--tblr-card-border-radius, 0.75rem);
}

/* Cards with header keep a clean separator between header and table body. */
.card>.card-header+.table-responsive,
.card>.card-header+.card-body>.table-responsive {
    border-top: 1px solid var(--tblr-border-color-translucent);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-left-radius: var(--tblr-card-border-radius, 0.75rem);
    border-bottom-right-radius: var(--tblr-card-border-radius, 0.75rem);
}

.card>.table-responsive>.table,
.card>.card-body>.table-responsive>.table {
    margin-bottom: 0;
}

.card>.table-responsive>.table>tbody>tr:last-child>*,
.card>.card-body>.table-responsive>.table>tbody>tr:last-child>* {
    border-bottom: 0 !important;
}

.hm-table thead th {
    font-size: 0.72rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--tblr-secondary);
    white-space: nowrap;
}

.hm-row-clickable {
    cursor: pointer;
}

.hm-row-clickable:hover>* {
    background: rgba(var(--tblr-primary-rgb), 0.06);
}

.hm-table .badge {
    white-space: nowrap;
}

.navbar-vertical .hm-subnav {
    display: flex;
    flex-direction: column;
    list-style: none;
    margin: 0.15rem 0 0.5rem 2.1rem;
    padding: 0;
}

.navbar-vertical .hm-subnav .nav-item {
    margin: 0;
}

.navbar-vertical .hm-subnav-link {
    margin: 0;
    padding: 0.2rem 0.5rem;
    font-size: 0.78rem;
    color: var(--hm-text-muted);
}

.navbar-vertical .hm-subnav-link .nav-link-icon {
    font-size: 0.9rem;
    opacity: 0.75;
}

.navbar-vertical .hm-subnav-link:hover {
    color: var(--hm-sidebar-link-hover);
    background: rgba(var(--tblr-primary-rgb), 0.06);
}

/* ─── Tom Select – Context Selector Overrides ─── */

.hm-top-context-wrap .ts-wrapper {
    min-width: 0;
}

.hm-top-context-wrap .ts-wrapper .ts-control {
    background: var(--tblr-bg-surface);
    color: var(--hm-sidebar-link);
    border: 1px solid var(--hm-sidebar-border);
    border-radius: var(--tblr-border-radius, 4px);
    font-size: 0.875rem;
    padding: 0.3rem 0.6rem;
    min-height: 0;
    height: 2rem;
    cursor: pointer;
    box-shadow: none;
    transition: border-color 0.15s ease;
    flex-wrap: nowrap !important;
    overflow: hidden;
}

.hm-top-context-wrap .ts-wrapper .ts-control:hover {
    border-color: var(--hm-brand);
}

.hm-top-context-icon {
    position: absolute;
    right: 0.72rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--hm-text-muted);
    font-size: 0.9rem;
    opacity: 0.85;
}

.hm-top-context-wrap .ts-wrapper .ts-control {
    padding-right: 2.15rem;
}

.hm-top-context-wrap .ts-wrapper::after,
.hm-top-context-wrap .ts-wrapper.single::after,
.hm-top-context-wrap .ts-wrapper .ts-control::after,
.hm-top-context-wrap .ts-wrapper.single .ts-control:after,
.hm-top-context-wrap .ts-wrapper.single.input-active .ts-control:after {
    display: none !important;
    border: 0 !important;
    content: none !important;
}

/* Keep context selector visually as search field */
.hm-top-context-wrap .ts-wrapper .ts-control .item {
    display: none !important;
}

.hm-top-context-wrap .ts-wrapper .ts-control>input {
    flex: 1 1 100% !important;
    width: 100% !important;
    opacity: 1 !important;
}

.hm-top-context-wrap .ts-wrapper.focus .ts-control {
    border-color: var(--hm-brand);
    box-shadow: 0 0 0 2px rgba(var(--tblr-primary-rgb), 0.15);
}

.hm-top-context-wrap .ts-wrapper .ts-control .item {
    color: var(--hm-sidebar-link);
    font-size: 0.875rem;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0;
}

.hm-top-context-wrap .ts-wrapper .ts-control>input {
    color: var(--hm-sidebar-link) !important;
    font-size: 0.875rem;
}

.hm-top-context-wrap .ts-wrapper .ts-control>input::placeholder {
    color: var(--hm-text-muted);
    opacity: 0.7;
}

.hm-top-context-wrap .ts-dropdown {
    background: var(--tblr-bg-surface);
    border: 1px solid var(--hm-sidebar-border);
    border-radius: var(--tblr-border-radius, 4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    z-index: 1050;
    margin-top: 4px;
}

.hm-top-context-wrap .ts-dropdown .ts-dropdown-content {
    max-height: 280px;
    padding: 4px;
}

.hm-top-context-wrap .ts-dropdown [data-selectable] {
    padding: 0.4rem 0.6rem;
    border-radius: 3px;
    font-size: 0.84rem;
    color: var(--hm-sidebar-link);
    cursor: pointer;
}

.hm-top-context-wrap .ts-dropdown [data-selectable]:hover,
.hm-top-context-wrap .ts-dropdown .active {
    background: rgba(var(--tblr-primary-rgb), 0.12);
    color: var(--hm-sidebar-link-hover);
}

/* Search match highlight – subtle underline instead of jarring yellow */
.hm-top-context-wrap .ts-dropdown .highlight {
    background: rgba(var(--tblr-primary-rgb), 0.18);
    color: inherit;
    border-radius: 2px;
    padding: 0 1px;
    font-weight: 600;
}

.hm-top-context-wrap .ts-dropdown .no-results {
    padding: 0.6rem;
    text-align: center;
    color: var(--hm-text-muted);
    font-size: 0.84rem;
}

.hm-top-context-wrap .ts-dropdown .hm-ts-option-global {
    font-weight: 600;
    border-bottom: 1px solid var(--hm-sidebar-border);
    margin-bottom: 2px;
    padding-bottom: 0.5rem;
}

.hm-ts-item i {
    opacity: 0.6;
    font-size: 0.8rem;
}

/* Dark mode specific adjustments */
[data-bs-theme="dark"] .hm-top-context-wrap .ts-dropdown {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] .hm-top-context-wrap .ts-wrapper .ts-control {
    background: rgba(255, 255, 255, 0.06);
}
/* Legacy design-token bridge for pages still using --color-* variables */
:root,
[data-bs-theme="light"] {
    --color-accent: var(--tblr-primary, #2563eb);
    --color-border: var(--hm-border-color, rgba(15, 23, 42, 0.14));
    --color-text: var(--tblr-body-color, #1f2937);
    --color-text-primary: var(--tblr-body-color, #1f2937);
    --color-text-muted: var(--tblr-secondary-color, #6b7280);
}

[data-bs-theme="dark"] {
    --color-accent: var(--tblr-primary, #3b82f6);
    --color-border: var(--hm-border-color, rgba(148, 163, 184, 0.24));
    --color-text: var(--tblr-body-color, #dce1e7);
    --color-text-primary: var(--tblr-body-color, #dce1e7);
    --color-text-muted: var(--tblr-secondary-color, #9aa6b2);
}

/* Legacy modal compatibility: custom modals use .active instead of Bootstrap .show */
.modal.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
}

.modal.active > .modal-box {
    background: var(--tblr-bg-surface, #fff);
    border: 1px solid var(--tblr-border-color, rgba(0, 0, 0, 0.125));
    border-radius: var(--tblr-border-radius-lg, 0.75rem);
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.3);
    margin: 1rem;
    padding: 1.25rem;
    max-height: calc(100vh - 2rem);
    overflow: auto;
}

.modal.active .modal-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.modal.active .modal-actions .btn {
    min-height: 2.2rem;
}


.hm-save-indicator {
    width: 1.9rem;
    height: 1.9rem;
    min-width: 1.9rem;
    min-height: 1.9rem;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 999px;
    justify-content: center;
    background: transparent;
    color: var(--hm-text-muted);
    user-select: none;
    transform: translateY(5px);
}

.hm-save-indicator-icon {
    font-size: 1rem;
    line-height: 1;
    display: none;
}

.hm-save-indicator[data-state=idle] .hm-save-indicator-icon-success,
.hm-save-indicator[data-state=saved] .hm-save-indicator-icon-success {
    display: inline-flex;
    color: var(--tblr-success);
}

.hm-save-indicator[data-state=saving] {
    color: var(--tblr-primary);
    border-color: rgba(var(--tblr-primary-rgb), 0.35);
    background: rgba(var(--tblr-primary-rgb), 0.05);
}

.hm-save-indicator[data-state=saving] .hm-save-indicator-icon-saving {
    display: inline-flex;
    animation: hm-save-indicator-spin 1s linear infinite;
}

.hm-save-indicator[data-state=error] {
    color: var(--tblr-danger);
    border-color: rgba(var(--tblr-danger-rgb), 0.35);
    background: rgba(var(--tblr-danger-rgb), 0.08);
}

.hm-save-indicator[data-state=error] .hm-save-indicator-icon-error {
    display: inline-flex;
}

@keyframes hm-save-indicator-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.vergabe-workspace-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.vergabe-workspace-title {
    color: var(--tblr-body-color);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.25;
    margin: 0;
    min-width: 0;
}

@media (max-width: 575.98px) {
    .vergabe-workspace-heading-row {
        align-items: stretch;
        flex-direction: column;
    }

    .vergabe-workspace-heading-row > .btn,
    .vergabe-workspace-heading-row > .btn-list {
        justify-content: flex-start;
    }
}

.hm-table-workspace {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.hm-table-workspace-page .page-body {
    overflow: hidden;
}

.hm-table-workspace-page .page-body > .container-fluid {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.hm-table-workspace-page .page-body > .container-fluid > .hm-table-workspace {
    flex: 1 1 auto;
}

.hm-table-workspace > .nav.nav-tabs:not(.card-header-tabs) {
    flex: 0 0 auto;
}

.hm-table-workspace-toolbar {
    flex: 0 0 auto;
    background: var(--hm-page-bg);
    position: relative;
    z-index: 75;
}

.hm-table-workspace-card {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    margin-bottom: 0 !important;
}

.hm-table-workspace-card > .card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.hm-wide-table-card {
    overflow: visible;
}

.hm-wide-table-card > .card-body {
    min-width: 0;
}

.hm-wide-table-scroll {
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    overscroll-behavior-x: contain;
}

.hm-wide-table-scrollbar {
    height: 14px;
    overflow-x: scroll;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
}

:root,
[data-bs-theme="light"] {
    --hm-scrollbar-track: transparent;
    --hm-scrollbar-thumb: rgba(100, 116, 139, 0.42);
    --hm-scrollbar-thumb-hover: rgba(100, 116, 139, 0.68);
}

[data-bs-theme="dark"] {
    --hm-scrollbar-track: transparent;
    --hm-scrollbar-thumb: rgba(148, 163, 184, 0.38);
    --hm-scrollbar-thumb-hover: rgba(148, 163, 184, 0.64);
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--hm-scrollbar-thumb) var(--hm-scrollbar-track);
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: var(--hm-scrollbar-track);
}

*::-webkit-scrollbar-thumb {
    min-height: 2.75rem;
    border: 3px solid transparent;
    border-radius: 999px;
    background: var(--hm-scrollbar-thumb);
    background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--hm-scrollbar-thumb-hover);
    background-clip: padding-box;
}

*::-webkit-scrollbar-corner {
    background: transparent;
}
