h1:focus {
    outline: none;
}

:root {
    /* Core */
    --app-dark: #0f172a; /* darker + cleaner (slate-900) */
    --app-dark-2: #111827; /* slate-900/800 mix */
    --app-light: #f8fafc; /* slate-50 */
    --app-surface: #ffffff;
    /* Accent */
    --app-accent: #3b82f6; /* blue-500 */
    --app-accent-2: #60a5fa; /* blue-400 */
    /* Layout */
    --app-topbar-height: 64px;
    --app-footer-height: 44px;
    /* UI */
    --app-radius: 14px;
    --app-radius-sm: 10px;
    --app-border: rgba(15, 23, 42, 0.08);
    --app-shadow: 0 10px 30px rgba(2, 6, 23, 0.08);
    /* Shell chrome (header/sidebar/footer) */
    --app-chrome-bg: #2b2f36;
    --app-chrome-bg-2: #3a4048;
    /* Sidebar/Nav */
    --nav-text: rgba(255,255,255,.78);
    --nav-text-muted: rgba(255,255,255,.55);
    --nav-bg-hover: rgba(255,255,255,.08);
    --nav-bg-active: rgba(59,130,246,.18);
    --nav-border: rgba(255,255,255,.08);
}

* {
    box-sizing: border-box;
}

body {
    background: var(--app-light);
    color: #0b1220;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
    height: 100%;
}

html {
    height: 100%;
}


/* -----------------------------
   BUTTONS (vereinheitlicht)
------------------------------ */
.btn {
    border-radius: 10px;
    font-weight: 600;
    padding: .5rem 1rem;
    transition: transform .08s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease;
}

.btn-primary,
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-danger {
    background: var(--app-dark);
    border-color: var(--app-dark);
    color: #fff;
}

.btn-outline-light {
    background: #fff;
    border-color: rgba(15, 23, 42, 0.2);
    color: var(--app-dark);
}

.btn-primary:hover,
.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-outline-danger:hover {
    background: var(--app-accent);
    border-color: var(--app-accent);
    color: #fff;
}

.btn-outline-light:hover {
    background: var(--app-accent);
    border-color: var(--app-accent);
    color: #fff;
}

.btn-primary:active,
.btn-outline-primary:active,
.btn-outline-secondary:active,
.btn-outline-danger:active {
    transform: translateY(1px);
}

.btn-primary:disabled,
.btn-outline-primary:disabled,
.btn-outline-secondary:disabled,
.btn-outline-danger:disabled {
    background: rgba(15, 23, 42, 0.35);
    border-color: rgba(15, 23, 42, 0.35);
    color: rgba(255,255,255,.75);
}

/* -----------------------------
   TOPBAR
------------------------------ */
.app-topbar {
    background: linear-gradient(180deg, var(--app-chrome-bg), var(--app-chrome-bg-2));
    min-height: var(--app-topbar-height);
    border-bottom: 1px solid rgba(255,255,255,.06);
}

    .app-topbar .navbar-brand {
        color: #fff;
        text-decoration: none;
        display: inline-flex;
        align-items: baseline;
        gap: .4rem;
    }

    .app-topbar .brand-mark {
        font-weight: 800;
        letter-spacing: .2px;
        font-size: 1.05rem;
    }

    .app-topbar .brand-sub {
        font-size: .82rem;
        opacity: .75;
    }

    .app-topbar .brand-logo {
        height: 28px;
        width: auto;
        display: block;
    }

/* -----------------------------
   OFFCANVAS (Mobile Nav)
------------------------------ */
.app-offcanvas {
    background: linear-gradient(180deg, var(--app-chrome-bg), var(--app-chrome-bg-2));
    color: rgba(255,255,255,.9);
    width: 290px;
    border-right: 1px solid var(--nav-border);
}

    .app-offcanvas .brand-logo-mobile {
        height: 38px;
        width: auto;
        display: inline-block;
    }

    .app-offcanvas .nav-link {
        color: rgba(255,255,255,.92);
        border-radius: .65rem;
        padding: .55rem .85rem;
        margin: .1rem .5rem;
        transition: background-color .15s ease, color .15s ease;
    }

        .app-offcanvas .nav-link:hover {
            color: var(--nav-text);
            background: rgba(255,255,255,.06);
        }

        .app-offcanvas .nav-link.active {
            color: #fff;
            background: rgba(255,255,255,.12);
            box-shadow: none;
        }

/* -----------------------------
   MAIN LAYOUT
------------------------------ */
.app-main {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

/* Content container (right side) */
.app-main-content {
    padding: 1.5rem;
    background: var(--app-light);
    overflow-y: auto;
    min-height: 0;
}

.app-shell {
    height: 100vh;
}

.app-sidebar {
    overflow-y: auto;
}


/* -----------------------------
   TICKETS (Layout)
------------------------------ */
.ticket-create-card {
    border: 1px solid var(--app-border);
}

.ticket-description-input {
    min-height: 280px;
    resize: vertical;
}

.ticket-comment-input {
    min-height: 180px;
    resize: vertical;
}

.ticket-detail-summary {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    align-items: start;
}

@media (max-width: 992px) {
    .ticket-detail-summary {
        grid-template-columns: 1fr;
    }
}

.ticket-detail-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: .5rem;
}

.ticket-detail-description {
    background: rgba(15, 23, 42, 0.04);
    padding: .85rem 1rem;
    border-radius: 12px;
    margin: 0;
    white-space: pre-wrap;
}

.ticket-detail-meta {
    display: grid;
    gap: .5rem;
    font-size: .95rem;
}

.ticket-detail-meta span {
    color: #64748b;
    font-weight: 600;
    margin-right: .35rem;
}

.ticket-page {
    width: 100%;
    max-width: none;
    margin: 0;
}

.ticket-card {
    border-radius: var(--app-radius);
    border: 1px solid var(--app-border);
    background: var(--app-surface);
}

.ticket-card-narrow {
    max-width: 860px;
}

.ticket-table {
    font-size: .9rem;
}

.ticket-table th,
.ticket-table td {
    padding: .75rem 1rem;
}

.ticket-table th {
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #64748b;
    background: #f8fafc;
}

.ticket-sort-button {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0;
    color: inherit;
    font: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    font-weight: 600;
}

.ticket-sort-indicator {
    min-width: 1ch;
}

.ticket-table td {
    border-color: var(--app-border);
}

.ticket-row {
    cursor: pointer;
}

.ticket-row td {
    transition: background-color .15s ease-in-out;
}

.ticket-row:hover td,
.ticket-row:focus-visible td {
    background: #eff6ff;
}


.ticket-list-page {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.ticket-list-card {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.ticket-list-card .card-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.ticket-id-wrap {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

.ticket-sla-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    padding: .15rem .4rem;
    line-height: 1;
}

.ticket-title-with-description {
    display: inline-block;
    max-width: 100%;
    cursor: help;
}


.ticket-date-time-line,
.ticket-person-line {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticket-date-time-line {
    font-variant-numeric: tabular-nums;
}

.ticket-badge {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
    border-radius: 999px;
    font-weight: 600;
    padding: .35rem .65rem;
}

.ticket-badge-muted {
    background: rgba(59, 130, 246, 0.12);
    color: #1e40af;
}

.ticket-priority-default {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

.ticket-priority-low {
    background: rgba(34, 197, 94, 0.18);
    color: #166534;
}

.ticket-priority-medium {
    background: rgba(250, 204, 21, 0.2);
    color: #92400e;
}

.ticket-priority-high {
    background: rgba(251, 146, 60, 0.2);
    color: #9a3412;
}

.ticket-priority-critical {
    background: rgba(239, 68, 68, 0.2);
    color: #991b1b;
}

.ticket-status-badge {
    border-radius: 999px;
    font-weight: 600;
    padding: .35rem .65rem;
    border: 1px solid transparent;
    background: #fff;
}

.ticket-status-default {
    border-color: rgba(148, 163, 184, 0.6);
    color: #475569;
}

.ticket-status-open {
    border-color: rgba(59, 130, 246, 0.6);
    color: #1d4ed8;
    background: rgba(59, 130, 246, 0.08);
}

.ticket-status-progress {
    border-color: rgba(14, 116, 144, 0.6);
    color: #0e7490;
    background: rgba(14, 116, 144, 0.08);
}

.ticket-status-waiting {
    border-color: rgba(234, 179, 8, 0.6);
    color: #92400e;
    background: rgba(234, 179, 8, 0.12);
}

.ticket-status-solved {
    border-color: rgba(34, 197, 94, 0.6);
    color: #15803d;
    background: rgba(34, 197, 94, 0.1);
}

.ticket-status-closed {
    border-color: rgba(107, 114, 128, 0.6);
    color: #374151;
    background: rgba(107, 114, 128, 0.12);
}

.company-type-kunde {
    border-color: rgba(59, 130, 246, 0.45);
    color: #1d4ed8;
    background: rgba(59, 130, 246, 0.08);
}

.company-type-lieferant {
    border-color: rgba(245, 158, 11, 0.45);
    color: #b45309;
    background: rgba(245, 158, 11, 0.1);
}

.company-type-dienstleister {
    border-color: rgba(14, 116, 144, 0.45);
    color: #0e7490;
    background: rgba(14, 116, 144, 0.1);
}

.company-type-sonstiges,
.company-status-inactive {
    border-color: rgba(100, 116, 139, 0.5);
    color: #475569;
    background: rgba(100, 116, 139, 0.1);
}

.ticket-mobile-item {
    border: 1px solid var(--app-border);
    border-radius: 16px;
    background: #fff;
    padding: 1rem;
    box-shadow: none;
    width: 100%;
    text-align: left;
}

.ticket-mobile-item .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.ticket-mobile-item + .ticket-mobile-item {
    margin-top: .5rem;
}

.ticket-mobile-meta {
    display: inline-flex;
    flex-direction: column;
    gap: .1rem;
    font-size: .78rem;
    color: #475569;
    background: rgba(15, 23, 42, 0.04);
    padding: .35rem .6rem;
    border-radius: 10px;
}

.ticket-mobile-label {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #94a3b8;
}

.ticket-detail-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    align-items: start;
}

.ticket-description {
    white-space: pre-wrap;
    background: rgba(15, 23, 42, 0.04);
    border-radius: 12px;
    padding: 1rem;
}

.ticket-info-card .ticket-info-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .35rem 0;
    font-size: .95rem;
}

.ticket-timeline {
    display: grid;
    gap: 1.25rem;
    position: relative;
}

.ticket-timeline-item {
    display: grid;
    grid-template-columns: 12px 1fr;
    gap: 1rem;
    align-items: start;
}

.ticket-timeline-marker {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--app-dark);
    margin-top: .4rem;
}

.ticket-timeline-content {
    background: rgba(15, 23, 42, 0.04);
    border-radius: 12px;
    padding: .75rem 1rem;
}

.ticket-message-card {
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.28);
    overflow: hidden;
}

.ticket-message-header {
    background: rgba(59, 130, 246, 0.08);
    padding: .65rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}

.ticket-message-content {
    background: rgba(255, 255, 255, 0.68);
    padding: .75rem 1rem .85rem;
}

.ticket-message-body {
    white-space: pre-wrap;
}

.ticket-message-meta-line {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .5rem;
    min-width: 0;
}

.ticket-message-meta-primary {
    display: inline-flex;
    align-items: baseline;
    gap: .5rem;
    flex-wrap: wrap;
}

.ticket-message-author {
    font-weight: 700;
}

.ticket-message-timestamp {
    font-size: .82rem;
    color: #64748b;
    font-weight: 400;
}

.ticket-message-delete-btn {
    margin-left: auto;
    border: 1px solid rgba(220, 38, 38, .38);
    background: rgba(220, 38, 38, .08);
    color: #b91c1c;
    border-radius: .45rem;
    font-size: .74rem;
    line-height: 1.05;
    font-weight: 600;
    padding: .24rem .5rem;
    white-space: nowrap;
}

.ticket-message-delete-btn:hover:not(:disabled) {
    background: rgba(220, 38, 38, .14);
    border-color: rgba(220, 38, 38, .5);
    color: #991b1b;
}

.ticket-message-delete-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.ticket-comment-cta-wrap {
    display: flex;
    justify-content: center;
    margin: 2.25rem 0 1.25rem;
}

.ticket-add-comment-btn {
    font-weight: 700;
    font-size: 1.02rem;
    padding: .7rem 1.35rem;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.ticket-inline-panel-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.38);
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
}

.ticket-inline-panel {
    width: min(760px, 100%);
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
}

@media (max-width: 576px) {
    .ticket-message-header {
        flex-wrap: wrap;
    }

    .ticket-message-delete-btn {
        margin-left: 0;
    }
}

@media (max-width: 992px) {
    .ticket-detail-grid {
        grid-template-columns: 1fr;
    }

    .ticket-page {
        max-width: 100%;
    }
}

/* Optional: give inner pages a “card” feel without forcing it */
.app-content {
    min-height: 60vh;
}

/* -----------------------------
   SIDEBAR (Desktop)
------------------------------ */
.app-sidebar {
    width: 240px;
    flex: 0 0 240px;
    background: linear-gradient(180deg, var(--app-chrome-bg), var(--app-chrome-bg-2));
    color: #fff;
    padding: .9rem .6rem 1rem;
    align-self: stretch;
    /* modern edge */
    border-right: 1px solid var(--nav-border);
}

    .app-sidebar .text-muted {
        color: var(--nav-text-muted) !important;
        margin: .75rem .85rem .35rem;
        font-size: .78rem;
        letter-spacing: .2px;
        text-transform: uppercase;
    }

    .app-sidebar .nav-link {
        color: var(--nav-text);
        border-radius: .75rem;
        margin: .15rem .55rem;
        font-size: .92rem;
        padding: .55rem .8rem;
        white-space: nowrap;
        transition: background-color .15s ease, color .15s ease, transform .05s ease;
    }

        .app-sidebar .nav-link:hover {
            color: #fff;
            background: var(--nav-bg-hover);
        }

        .app-sidebar .nav-link:active {
            transform: translateY(1px);
        }

        .app-sidebar .nav-link.active {
            color: #fff;
            background: var(--nav-bg-active);
            box-shadow: inset 0 0 0 1px rgba(96,165,250,.25);
        }

    /* Optional: subtle divider line inside sidebar */
    .app-sidebar hr {
        border-color: rgba(255,255,255,.08);
        margin: .8rem .9rem;
    }

/* -----------------------------
   FOOTER (same background as header/sidebar)
------------------------------ */
.app-footer {
    background: linear-gradient(180deg, var(--app-chrome-bg), var(--app-chrome-bg-2));
    min-height: var(--app-footer-height);
    border-top: 1px solid rgba(255,255,255,.06);
    color: rgba(255,255,255,.72);
    display: flex;
    align-items: center;
}

    .app-footer .brand-logo-footer {
        height: 18px;
        width: auto;
        display: inline-block;
    }

    /* If you have links in the footer */
    .app-footer a {
        color: rgba(255,255,255,.82);
        text-decoration: none;
    }

        .app-footer a:hover {
            color: #fff;
            text-decoration: underline;
        }

.offcanvas-footer {
    background: linear-gradient(180deg, var(--app-chrome-bg), var(--app-chrome-bg-2));
    border-top-color: var(--nav-border) !important;
    padding-left: calc(1rem + env(safe-area-inset-left));
    padding-right: calc(1rem + env(safe-area-inset-right));
}

.btn-logout-soft {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fff;
}

.btn-logout-soft:hover {
    background: rgba(239, 68, 68, 0.32);
    border-color: rgba(239, 68, 68, 0.6);
    color: #fff;
}

.mobile-account-button {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-footer .container-fluid {
    padding-left: calc(1rem + env(safe-area-inset-left));
    padding-right: calc(1rem + env(safe-area-inset-right));
}

@media (max-width: 576px) {
    .app-footer .container-fluid {
        justify-content: center;
        align-items: center;
        text-align: center;
    }
}

/* -----------------------------
   FORMS + VALIDATION
------------------------------ */
:focus-visible {
    outline: 3px solid rgba(59,130,246,.45);
    outline-offset: 2px;
    border-radius: 8px;
}

.valid.modified:not([type=checkbox]) {
    outline: 2px solid rgba(38,176,80,.65);
    outline-offset: 2px;
    border-radius: 8px;
}

.invalid {
    outline: 2px solid rgba(229,0,0,.65);
    outline-offset: 2px;
    border-radius: 8px;
}

.validation-message {
    color: #e50000;
}

/* -----------------------------
   BLAZOR ERROR BOUNDARY (unchanged, just slightly modern)
------------------------------ */
.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow);
    margin: 1rem;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* Floating labels placeholders */
.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Light-mode chrome tuning */
:root {
    --app-dark: #1f2937;
    --app-dark-2: #1f2937;
}

/* 2) Footer: gleiche Backgroundfarbe wie Header/Sidebar + Text hell */
.app-footer {
    background: linear-gradient(180deg, var(--app-chrome-bg), var(--app-chrome-bg-2)) !important;
    border-top: 1px solid rgba(255,255,255,.08);
    color: rgba(255,255,255,.82) !important;
}

    .app-footer a {
        color: rgba(255,255,255,.9) !important;
    }

        .app-footer a:hover {
            color: #fff !important;
        }

    /* Footer: Bootstrap .text-muted überschreiben (nur im Footer) */
    .app-footer .text-muted {
        color: rgba(255,255,255,.78) !important;
    }

    /* Optional: Link im Footer noch etwas heller + Hover */
    .app-footer a.text-muted {
        color: rgba(255,255,255,.88) !important;
    }

        .app-footer a.text-muted:hover {
            color: #fff !important;
            text-decoration: underline !important;
        }


:root {
    --app-sidebar-width: 200px; /* z.B. 190–210px ist oft perfekt */
}

/* SIDEBAR (Desktop) */
.app-sidebar {
    width: var(--app-sidebar-width);
    flex: 0 0 var(--app-sidebar-width);
    padding: .85rem .45rem 1rem; /* etwas weniger Luft */
}

    /* Links etwas kompakter */
    .app-sidebar .nav-link {
        margin: .12rem .35rem; /* weniger seitliche Luft */
        padding: .5rem .65rem; /* etwas kompakter */
        font-size: .92rem; /* kann so bleiben */
    }

    .app-sidebar .nav-link {
        display: flex;
        align-items: center;
        gap: .6rem;
    }

        .app-sidebar .nav-link i,
        .app-sidebar .nav-link svg {
            flex: 0 0 18px;
            width: 18px;
            height: 18px;
            opacity: .95;
        }

.meta-badge {
    display: inline-flex;
    align-items: center;
    padding: .22rem .55rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .01em;
    color: #0f172a;
    background: rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(15, 23, 42, 0.10);
    margin-right: .45rem;
    white-space: nowrap;
}

    .meta-badge.accent {
        background: rgba(59,130,246,.12);
        border-color: rgba(59,130,246,.22);
        color: #1e40af;
    }

.dashboard-home .dashboard-kpi {
    background: linear-gradient(135deg, rgba(148,163,184,.12), rgba(15,23,42,.02));
}

.dashboard-input {
    min-width: 120px;
}

.dashboard-chart {
    background: #f8fafc;
    border-radius: .85rem;
    padding: 1rem;
}

.dashboard-trend-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .85rem;
    margin-bottom: .75rem;
}

.dashboard-trend-legend-item {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .78rem;
    font-weight: 600;
    color: #334155;
}

.dashboard-trend-legend-swatch {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.dashboard-trend-legend-swatch-created {
    background: #2563eb;
}

.dashboard-trend-legend-swatch-closed {
    background: #16a34a;
}

.dashboard-trend-bars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
    gap: .55rem;
    align-items: end;
    min-height: 220px;
}

.dashboard-trend-day {
    display: grid;
    grid-template-rows: 1fr auto auto;
    align-items: end;
    gap: .3rem;
    height: 100%;
}

.dashboard-trend-bar {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 170px;
    background: rgba(148, 163, 184, .18);
    border-radius: .6rem;
    overflow: hidden;
}

.dashboard-trend-segment {
    width: 100%;
    height: var(--trend-height, 0%);
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: height .3s ease;
}

.dashboard-trend-segment-has-value {
    height: max(var(--trend-height, 0%), 20px);
}

.dashboard-trend-segment-created {
    background: linear-gradient(180deg, #2563eb, #60a5fa);
}

.dashboard-trend-segment-closed {
    background: linear-gradient(180deg, #16a34a, #4ade80);
}

.dashboard-trend-value {
    font-weight: 700;
    font-size: .72rem;
    color: #fff;
    text-shadow: 0 1px 2px rgba(15, 23, 42, .35);
}

.dashboard-trend-date {
    text-align: center;
    font-size: .68rem;
    color: #64748b;
}

.dashboard-assigned-list {
    display: grid;
    gap: .75rem;
}

.dashboard-assigned-item {
    display: grid;
    gap: .35rem;
    min-width: 0;
}

.dashboard-assigned-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, .25);
    overflow: hidden;
}

.dashboard-assigned-fill {
    height: 100%;
    border-radius: inherit;
}

.dashboard-legend-swatch {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}


.dashboard-score-detail-list {
    display: grid;
    gap: 1rem;
}

.dashboard-score-detail-item {
    display: grid;
    gap: .55rem;
    padding: .6rem .7rem;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: .75rem;
    background: rgba(248, 250, 252, .55);
}

.dashboard-score-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem;
}

.dashboard-score-chip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .4rem;
    border-radius: .55rem;
    padding: .3rem .5rem;
    background: rgba(148, 163, 184, .12);
    font-size: .8rem;
}

.dashboard-score-chip strong {
    font-size: .9rem;
}

.dashboard-location-wrap {
    display: grid;
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    gap: 1.6rem;
    align-items: center;
}

.dashboard-donut {
    width: 270px;
    height: 270px;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-inline: auto;
}

.dashboard-donut-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.dashboard-donut-track {
    fill: none;
    stroke: rgba(148, 163, 184, .22);
    stroke-width: 16;
}

.dashboard-donut-segment {
    fill: none;
    stroke-width: 16;
    stroke-linecap: butt;
    transition: stroke-width .18s ease, filter .18s ease;
    cursor: pointer;
}

.dashboard-donut-segment:hover {
    stroke-width: 18;
    filter: brightness(1.1);
}

.dashboard-donut-hole {
    width: 62%;
    height: 62%;
    border-radius: 50%;
    background: var(--bs-body-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .35);
    position: absolute;
    z-index: 2;
}

.dashboard-location-legend-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
    padding-left: 1.5rem;
    gap: .35rem;
}

.dashboard-location-name {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: .9rem;
}

.dashboard-location-legend-list .dashboard-assigned-item {
    gap: .2rem;
}

.dashboard-location-legend-list .fw-semibold {
    font-size: .88rem;
}


@media (max-width: 991px) {
    .app-main-content {
        padding: 1rem;
    }

    .dashboard-chart {
        padding: .75rem;
    }

    .dashboard-trend-bars {
        min-height: 190px;
        gap: .4rem;
    }

    .dashboard-trend-bar {
        height: 140px;
    }

}


@media (max-width: 575px) {
    .app-main-content {
        padding: .85rem;
    }

    .dashboard-trend-bars {
        grid-template-columns: repeat(auto-fit, minmax(30px, 1fr));
        gap: .35rem;
    }

    .dashboard-score-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-location-wrap {
        grid-template-columns: 1fr;
    }

    .dashboard-donut {
        width: 210px;
        height: 210px;
    }

    .dashboard-trend-bar {
        height: 120px;
    }

    .dashboard-trend-value {
        font-size: .62rem;
    }

}


.ticket-upload-picker {
    position: relative;
    overflow: hidden;
}

.ticket-upload-input-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.ticket-upload-zone {
    border: 2px dashed rgba(15, 23, 42, 0.2);
    border-radius: 12px;
    padding: 1rem;
    background: rgba(248, 250, 252, 0.8);
}

.ticket-upload-zone-dragging {
    border-color: var(--app-accent);
    background: rgba(59, 130, 246, 0.08);
}

.ticket-files-list {
    display: grid;
    gap: .5rem;
}

.ticket-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    padding: .45rem .6rem;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.04);
    min-width: 0;
}

.ticket-file-name {
    flex: 1 1 auto;
    min-width: 0;
}

.ticket-file-name-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-file-actions {
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ticket-file-actions .btn {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .ticket-file-item {
        flex-direction: column;
        align-items: stretch;
    }

    .ticket-file-actions {
        justify-content: flex-start;
    }
}




.ticket-file-name-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ticket-file-upload-meta {
    color: #64748b;
    font-size: .78rem;
    line-height: 1.2;
}


.ticket-image-overlay {
    position: fixed;
    top: var(--app-topbar-height);
    right: 0;
    bottom: var(--app-footer-height);
    left: 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.92);
}

@media (min-width: 1400px) {
    .ticket-image-overlay {
        left: var(--app-sidebar-width);
    }
}

.ticket-image-overlay-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
}

.ticket-image-overlay-file-meta {
    min-width: 0;
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.ticket-image-overlay-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-image-overlay-upload-meta {
    color: #94a3b8;
    font-size: .82rem;
}

.ticket-image-overlay-controls {
    display: flex;
    align-items: center;
    gap: .45rem;
}

.ticket-image-preview-zoom {
    color: #e2e8f0;
    font-size: .85rem;
    min-width: 3.5rem;
    text-align: center;
}

.ticket-image-overlay-stage {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.ticket-image-overlay-content {
    transform-origin: center center;
    transition: transform .15s ease;
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    box-shadow: 0 16px 32px rgba(2, 6, 23, 0.45);
}

.ticket-upload-zone-compact {
    padding: .7rem;
}

.ticket-upload-zone-compact .btn {
    padding: .35rem .7rem;
    font-size: .85rem;
}

.ticket-upload-zone-compact .small {
    font-size: .8rem;
}


.sla-page .ticket-card {
    border-color: rgba(30, 64, 175, 0.2);
}

.sla-header-card {
    background: linear-gradient(135deg, #f8fbff 0%, #eff6ff 100%);
}

.sla-list-card .ticket-row:hover td,
.sla-list-card .ticket-row:focus-visible td {
    background: #e0ecff;
}

.sla-counter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .5rem .85rem;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
    background: rgba(37, 99, 235, 0.12);
    color: #1e40af;
}

.sla-due-badge {
    border-radius: 999px;
    font-weight: 700;
    padding: .35rem .7rem;
    border: 1px solid transparent;
}

.sla-due-overdue {
    background: rgba(239, 68, 68, 0.22);
    border-color: rgba(220, 38, 38, 0.5);
    color: #991b1b;
}

.sla-due-today {
    background: rgba(245, 158, 11, 0.26);
    border-color: rgba(217, 119, 6, 0.55);
    color: #92400e;
}

.sla-due-soon {
    background: rgba(59, 130, 246, 0.16);
    border-color: rgba(37, 99, 235, 0.4);
    color: #1d4ed8;
}

.sla-due-future {
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(5, 150, 105, 0.4);
    color: #065f46;
}

.theme-toggle-button {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.admin-log-detail-row {
    --bs-table-bg: rgba(148, 163, 184, 0.09);
}

.admin-log-detail-cell {
    background: rgba(148, 163, 184, 0.09);
}

.admin-log-change-table {
    --bs-table-bg: rgba(255, 255, 255, 0.98);
}

.admin-log-json {
    background: rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: .65rem;
    padding: .75rem;
    color: inherit;
}

:root[data-theme='dark'] {
    --app-light: #151515;
    --app-surface: #1e1e1e;
    --app-border: rgba(148, 163, 184, 0.38);
    --app-shadow: 0 10px 30px rgba(2, 6, 23, 0.55);
    --app-chrome-bg: #232830;
    --app-chrome-bg-2: #2d333c;
}

:root[data-theme='dark'] body {
    background: #151515;
    color: #e2e8f0;
}

:root[data-theme='dark'] .app-main-content {
    background: var(--app-light);
}

:root[data-theme='dark'] .ticket-card,
:root[data-theme='dark'] .ticket-mobile-item,
:root[data-theme='dark'] .dashboard-chart {
    background: var(--app-surface);
    border-color: var(--app-border);
}


:root[data-theme='dark'] .dashboard-trend-legend-item,
:root[data-theme='dark'] .dashboard-trend-date {
    color: #cbd5e1;
}

:root[data-theme='dark'] .table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(148, 163, 184, 0.08);
    --bs-table-hover-bg: rgba(148, 163, 184, 0.12);
    --bs-table-color: #e2e8f0;
    --bs-table-border-color: var(--app-border);
}

:root[data-theme='dark'] .ticket-table th {
    background: rgba(20, 20, 20, 0.9);
    color: #cbd5e1;
}

:root[data-theme='dark'] .ticket-description,
:root[data-theme='dark'] .ticket-detail-description,
:root[data-theme='dark'] .ticket-mobile-meta,
:root[data-theme='dark'] .dashboard-home .dashboard-kpi {
    background: rgba(33, 33, 33, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.22);
}

:root[data-theme='dark'] .ticket-row:hover td,
:root[data-theme='dark'] .ticket-row:focus-visible td,
:root[data-theme='dark'] .sla-list-card .ticket-row:hover td,
:root[data-theme='dark'] .sla-list-card .ticket-row:focus-visible td {
    background: rgba(148, 163, 184, 0.12);
}

:root[data-theme='dark'] .ticket-upload-zone {
    background: rgba(36, 36, 36, 0.92);
    border-color: rgba(148, 163, 184, 0.6);
}

:root[data-theme='dark'] .ticket-file-item {
    background: rgba(36, 36, 36, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.45);
}

:root[data-theme='dark'] .ticket-timeline-content {
    background: rgba(36, 36, 36, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.35);
}

:root[data-theme='dark'] .ticket-timeline-marker {
    background: #93c5fd;
    box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.2);
}

:root[data-theme='dark'] .ticket-badge,
:root[data-theme='dark'] .meta-badge {
    background: rgba(148, 163, 184, 0.2);
    border-color: rgba(148, 163, 184, 0.35);
    color: #e2e8f0;
}

:root[data-theme='dark'] .ticket-badge-muted,
:root[data-theme='dark'] .meta-badge.accent,
:root[data-theme='dark'] .sla-counter-pill {
    background: rgba(59, 130, 246, 0.2);
    color: #bfdbfe;
}

:root[data-theme='dark'] .ticket-status-badge {
    background: rgba(15, 23, 42, 0.45);
    color: #e2e8f0;
}

:root[data-theme='dark'] .ticket-status-open {
    border-color: rgba(96, 165, 250, 0.8);
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.18);
}

:root[data-theme='dark'] .ticket-status-progress {
    border-color: rgba(34, 211, 238, 0.75);
    color: #67e8f9;
    background: rgba(14, 116, 144, 0.22);
}

:root[data-theme='dark'] .ticket-status-waiting {
    border-color: rgba(250, 204, 21, 0.75);
    color: #fde68a;
    background: rgba(180, 83, 9, 0.25);
}

:root[data-theme='dark'] .ticket-status-solved {
    border-color: rgba(74, 222, 128, 0.75);
    color: #86efac;
    background: rgba(22, 101, 52, 0.24);
}

:root[data-theme='dark'] .ticket-status-closed {
    border-color: rgba(148, 163, 184, 0.75);
    color: #cbd5e1;
    background: rgba(71, 71, 71, 0.5);
}


:root[data-theme='dark'] .company-type-kunde {
    border-color: rgba(96, 165, 250, 0.55);
    color: #bfdbfe;
    background: rgba(59, 130, 246, 0.2);
}

:root[data-theme='dark'] .company-type-lieferant {
    border-color: rgba(251, 191, 36, 0.55);
    color: #fde68a;
    background: rgba(245, 158, 11, 0.2);
}

:root[data-theme='dark'] .company-type-dienstleister {
    border-color: rgba(34, 211, 238, 0.55);
    color: #a5f3fc;
    background: rgba(14, 116, 144, 0.25);
}

:root[data-theme='dark'] .company-type-sonstiges,
:root[data-theme='dark'] .company-status-inactive {
    border-color: rgba(148, 163, 184, 0.55);
    color: #cbd5e1;
    background: rgba(71, 85, 105, 0.3);
}

:root[data-theme='dark'] .ticket-priority-default {
    background: rgba(100, 116, 139, 0.36);
    color: #f8fafc;
}

:root[data-theme='dark'] .ticket-priority-low {
    background: rgba(21, 128, 61, 0.45);
    color: #dcfce7;
}

:root[data-theme='dark'] .ticket-priority-medium {
    background: rgba(180, 83, 9, 0.48);
    color: #fef3c7;
}

:root[data-theme='dark'] .ticket-priority-high {
    background: rgba(194, 65, 12, 0.5);
    color: #ffedd5;
}

:root[data-theme='dark'] .ticket-priority-critical {
    background: rgba(185, 28, 28, 0.52);
    color: #fee2e2;
}

:root[data-theme='dark'] .sla-due-overdue {
    background: rgba(185, 28, 28, 0.54);
    border-color: rgba(252, 165, 165, 0.7);
    color: #fee2e2;
}

:root[data-theme='dark'] .sla-due-today {
    background: rgba(180, 83, 9, 0.55);
    border-color: rgba(253, 186, 116, 0.72);
    color: #ffedd5;
}

:root[data-theme='dark'] .sla-due-soon {
    background: rgba(30, 64, 175, 0.52);
    border-color: rgba(147, 197, 253, 0.7);
    color: #dbeafe;
}

:root[data-theme='dark'] .sla-due-future {
    background: rgba(6, 95, 70, 0.55);
    border-color: rgba(110, 231, 183, 0.72);
    color: #d1fae5;
}

:root[data-theme='dark'] .ticket-message-card {
    border-color: rgba(148, 163, 184, 0.45);
}

:root[data-theme='dark'] .ticket-message-header {
    background: rgba(30, 64, 175, 0.28);
    border-bottom-color: rgba(148, 163, 184, 0.55);
}

:root[data-theme='dark'] .ticket-message-content {
    background: rgba(23, 23, 23, 0.88);
}

:root[data-theme='dark'] .ticket-message-timestamp {
    color: #94a3b8;
}

:root[data-theme='dark'] .ticket-message-delete-btn {
    background: rgba(248, 113, 113, .14);
    border-color: rgba(248, 113, 113, .42);
    color: #fecaca;
}

:root[data-theme='dark'] .ticket-message-delete-btn:hover:not(:disabled) {
    background: rgba(248, 113, 113, .2);
    border-color: rgba(252, 165, 165, .56);
    color: #fee2e2;
}

:root[data-theme='dark'] .ticket-add-comment-btn {
    box-shadow: 0 10px 24px rgba(30, 64, 175, 0.35);
}

:root[data-theme='dark'] .ticket-inline-panel-backdrop {
    background: rgba(2, 6, 23, 0.68);
}

:root[data-theme='dark'] .ticket-detail-meta span,
:root[data-theme='dark'] .ticket-mobile-meta,
:root[data-theme='dark'] .ticket-file-upload-meta,
:root[data-theme='dark'] .text-muted {
    color: #94a3b8 !important;
}


:root[data-theme='dark'] .dashboard-trend-bar,
:root[data-theme='dark'] .dashboard-assigned-track {
    background: rgba(148, 163, 184, .2);
}

:root[data-theme='dark'] .dashboard-score-detail-item {
    background: rgba(15, 23, 42, .55);
    border-color: rgba(148, 163, 184, .3);
}

:root[data-theme='dark'] .dashboard-score-chip {
    background: rgba(148, 163, 184, .18);
}

:root[data-theme='dark'] .dashboard-donut-hole {
    background: rgba(15, 23, 42, .9);
}

:root[data-theme='dark'] .btn-outline-light {
    background: transparent;
    border-color: rgba(148, 163, 184, 0.55);
    color: #e2e8f0;
}

:root[data-theme='dark'] .btn-outline-light:hover {
    color: #fff;
    border-color: rgba(191, 219, 254, 0.75);
}

:root[data-theme='dark'] .admin-log-card {
    background: var(--app-surface);
    border-color: var(--app-border);
}

:root[data-theme='dark'] .admin-log-detail-row,
:root[data-theme='dark'] .admin-log-detail-cell {
    --bs-table-bg: rgba(30, 41, 59, 0.55);
    background: rgba(30, 41, 59, 0.55);
}

:root[data-theme='dark'] .admin-log-change-table {
    --bs-table-bg: rgba(17, 24, 39, 0.88);
    --bs-table-striped-bg: rgba(148, 163, 184, 0.08);
    --bs-table-hover-bg: rgba(148, 163, 184, 0.14);
    --bs-table-color: #e2e8f0;
    --bs-table-border-color: rgba(148, 163, 184, 0.45);
}

:root[data-theme='dark'] .admin-log-json {
    background: rgba(2, 6, 23, 0.58);
    border-color: rgba(148, 163, 184, 0.42);
    color: #e2e8f0;
}

.requester-picker-wrap {
    position: relative;
}

.requester-suggestions {
    position: absolute;
    z-index: 20;
    width: 100%;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    background: var(--bs-body-bg);
    margin-top: .35rem;
}

.requester-suggestion-item {
    width: 100%;
    display: block;
    text-align: left;
    border: 0;
    background: transparent;
    padding: .65rem .8rem;
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

.requester-suggestion-item:last-child {
    border-bottom: 0;
}

.requester-suggestion-item:hover {
    background: rgba(88, 101, 242, .08);
}

.requester-suggestion-name {
    font-weight: 600;
}

.requester-suggestion-meta {
    font-size: .82rem;
    color: var(--bs-secondary-color);
}

.requester-selected-card {
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    padding: .65rem .8rem;
    background: rgba(88, 101, 242, .06);
}

.requester-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, .45);
    z-index: 1040;
}

.requester-modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(92vw, 620px);
    max-height: 90vh;
    overflow: auto;
    z-index: 1050;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 1rem;
    padding: 1rem;
}

.requester-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .75rem;
}

.requester-hover-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    z-index: 1;
}

.requester-hover-panel {
    display: none;
    position: absolute;
    bottom: calc(100% + .45rem);
    left: 0;
    z-index: 2200;
    min-width: 280px;
    max-width: min(360px, calc(100vw - 2rem));
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    padding: .75rem;
    box-shadow: 0 .6rem 1.6rem rgba(15, 23, 42, .2);
}

.requester-hover-wrap.requester-hover-align-end .requester-hover-panel {
    left: auto;
    right: 0;
}

.requester-hover-wrap:hover .requester-hover-panel {
    display: block;
}

.ticket-table .ticket-row {
    position: relative;
    z-index: 1;
}

.ticket-table .ticket-row:hover,
.ticket-table .ticket-row:focus-visible,
.ticket-table .ticket-row:focus-within {
    z-index: 25;
}

.ticket-table .ticket-row:hover .requester-hover-wrap,
.ticket-table .ticket-row:focus-visible .requester-hover-wrap,
.ticket-table .ticket-row:focus-within .requester-hover-wrap {
    z-index: 2100;
}

@media (max-width: 768px) {
    .requester-modal {
        width: 96vw;
        max-height: 94vh;
        padding: .85rem;
    }

    .requester-hover-panel {
        left: 0;
        right: auto;
        min-width: 240px;
    }

    .requester-hover-wrap.requester-hover-align-end .requester-hover-panel {
        left: auto;
        right: 0;
    }
}

.notification-menu {
    width: min(92vw, 380px);
    max-height: 60vh;
    overflow-y: auto;
}

.notification-item {
    white-space: normal;
}

.notification-unread {
    border-left: 3px solid var(--bs-info);
    padding-left: 0.6rem;
}

.notification-link {
    color: inherit;
    text-decoration: none;
    width: 100%;
}

.notification-link:hover {
    color: inherit;
    text-decoration: none;
}

.ticket-message-notify-meta {
    margin-top: .45rem;
    display: inline-flex;
    font-size: .8rem;
    color: var(--bs-info-text-emphasis);
    background: color-mix(in srgb, var(--bs-info) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--bs-info) 45%, transparent);
    border-radius: 999px;
    padding: .2rem .55rem;
}

.notifications-table .notification-row-unread td {
    border-left: 3px solid var(--bs-danger);
}

.notifications-page .table {
    margin-bottom: 0;
}

.notification-bell .btn {
    min-width: 2.15rem;
}

.notifications-mobile-list {
    display: grid;
    gap: .75rem;
}

.notification-mobile-card {
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    padding: .75rem;
    background: var(--bs-body-bg);
}

.notification-mobile-card-unread {
    border-left: 3px solid var(--bs-danger);
}

.notification-bell {
    flex: 0 0 auto;
}

.ticket-notify-label {
    color: #4da3ff;
    font-weight: 600;
}

.ticket-notify-select {
    max-width: 260px;
}

@media (max-width: 991.98px) {
    .ticket-notify-select {
        max-width: 100%;
    }
}

/* Navbar Brand auf kleinen Geräten sauber darstellen */
.navbar-brand {
    min-width: 0;
}

.brand-mark,
.brand-sub {
    white-space: nowrap;
}