body {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    background: #f7f8fb;
    color: #1b1f29;
}

a {
    color: #0d6efd;
}

a:hover {
    color: #0a58ca;
}

.navbar {
    background: linear-gradient(135deg, #f3f6ff 0%, #ffffff 60%);
    border-bottom: 1px solid rgba(13, 110, 253, 0.12);
}

.navbar-brand {
    letter-spacing: 0.04em;
    font-weight: 700;
    color: #0b3d91 !important;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #0d6efd;
    box-shadow: 0 0 10px rgba(13, 110, 253, 0.65);
}

.topbar {
    background: linear-gradient(135deg, #f3f6ff 0%, #ffffff 60%);
    border-bottom: 1px solid rgba(13, 110, 253, 0.12);
    backdrop-filter: blur(8px);
}

.topbar-nav-list {
    list-style: none;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    box-shadow: none;
    transition: max-height 0.2s ease;
}

.topbar-menu-toggle {
    border: none;
    background: transparent;
    color: #1b1f29;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.topbar-menu-toggle:focus,
.topbar-menu-toggle:hover {
    background: rgba(13, 110, 253, 0.12);
    color: #0d6efd;
}

.topbar-menu-icon {
    position: relative;
    width: 20px;
    height: 2px;
    background-color: currentColor;
    border-radius: 2px;
}

.topbar-menu-icon::before,
.topbar-menu-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 20px;
    height: 2px;
    background-color: currentColor;
    border-radius: 2px;
    transition: transform 0.2s ease;
}

.topbar-menu-icon::before {
    top: -6px;
}

.topbar-menu-icon::after {
    top: 6px;
}

.topbar-menu-toggle[aria-expanded="true"] .topbar-menu-icon {
    background-color: transparent;
}

.topbar-menu-toggle[aria-expanded="true"] .topbar-menu-icon::before {
    transform: translateY(6px) rotate(45deg);
}

.topbar-menu-toggle[aria-expanded="true"] .topbar-menu-icon::after {
    transform: translateY(-6px) rotate(-45deg);
}

.topbar-nav-list.collapse {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.topbar-nav-list.collapse.show {
    display: flex;
}

.topbar-logo {
    height: 73px;
    width: auto;
    display: block;
}

.company-header-logo {
    display: block;
    max-height: 108px;
    max-width: min(630px, 80vw);
    width: auto;
    height: auto;
    object-fit: contain;
}

.topbar-nav-list.collapse .nav-link {
    display: block;
    width: 100%;
}

.topbar-nav-list.collapse .nav-link.user-link {
    display: flex;
    justify-content: flex-start;
}

.topbar-nav-list.collapse .topbar-divider {
    display: none;
}

@media (max-width: 767.98px) {
    .topbar-nav-list.collapse .nav-link {
        text-align: left;
    }
}

@media (min-width: 768px) {
    .topbar-nav-list.collapse {
        display: flex !important;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 0.5rem;
        margin-top: 0.75rem;
        width: auto !important;
    }

    .topbar-nav-list.collapse .nav-link {
        display: inline-flex;
        width: auto;
    }

    .topbar-nav-list.collapse .topbar-divider {
        display: inline-block;
    }
}

.contract-action-bar {
    margin: 1.75rem 0 2.25rem;
}

@media (max-width: 576px) {
    .contract-action-bar {
        margin: 1.25rem 0 2rem;
    }
}

.flash-messages {
    margin-top: 1.75rem;
    margin-bottom: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.inbox-search .input-group {
    max-width: 420px;
}

.inbox-search .form-control {
    border-radius: 999px 0 0 999px;
    padding-left: 1.1rem;
}

.inbox-search .btn {
    border-radius: 0 999px 999px 0;
}

.nav-tabs.nav-tabs-soft {
    border-bottom: 1px solid rgba(148, 163, 184, 0.4);
    gap: 0.35rem;
    flex-wrap: wrap;
}

.nav-tabs.nav-tabs-soft .nav-link {
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 0.9rem 0.9rem 0 0;
    padding: 0.65rem 1.35rem;
    background: #e7edf6;
    color: #152238;
    font-weight: 500;
    transition: all 0.18s ease;
    margin-bottom: -1px;
}

.nav-tabs.nav-tabs-soft .nav-link:hover {
    background: #d9e3f0;
    color: #0a1a33;
}

.nav-tabs.nav-tabs-soft .nav-link.active,
.nav-tabs.nav-tabs-soft .nav-link.active:hover {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.5) rgba(148, 163, 184, 0.5) #ffffff;
    color: #0b1739;
    box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.12);
    padding-top: 1.2rem;
    padding-bottom: 0.45rem;
    margin-top: -0.45rem;
}

.nav-tabs.nav-tabs-soft .nav-link:focus-visible {
    outline: 2px solid rgba(13, 110, 253, 0.35);
    outline-offset: 2px;
}

.discussion-form {
    margin-bottom: 2.5rem;
}

.loan-repayments-card .repayment-summary-grid {
    margin-bottom: 1.5rem;
}

.loan-repayments-card .summary-card {
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 1rem;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 90%);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    padding: 1rem 1.25rem;
    min-height: 100%;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.loan-repayments-card .summary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

.loan-repayments-card .summary-card .summary-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    font-weight: 600;
}

.loan-repayments-card .summary-card .summary-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
}

.loan-repayment-form .form-surface {
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 1rem;
    background: #f8fafc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.loan-repayment-form .form-surface .form-label {
    font-weight: 600;
    color: #334155;
}

.loan-repayment-form .form-surface .btn {
    border-radius: 0.75rem;
    padding: 0.65rem 1.2rem;
}

/* Authentication */
.auth-body {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 40%, #e1f2ff 100%);
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.auth-body-light {
    background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 40%, #e1f2ff 100%);
}

.auth-header {
    position: relative;
    padding: 2rem 2.5rem 1rem;
    display: flex;
    justify-content: center;
}

.auth-branding {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: #1d4ed8;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-logo-badge {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #60a5fa, #1d4ed8);
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.4);
    display: inline-block;
}

.auth-container {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Kein vertikales Padding, damit echte Zentrierung gewährleistet ist */
    padding: 0 clamp(1.75rem, 5vw, 3.25rem);
    width: 100%;
    flex: 1 1 auto;
}

.auth-wrapper {
    position: relative;
    width: 100%;
}

.auth-shell {
    display: grid;
    gap: clamp(2rem, 4vw, 3rem);
    align-items: stretch;
}

@media (min-width: 992px) {
    .auth-shell {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.9fr);
    }
}

.auth-preview {
    position: relative;
    border-radius: 28px;
    background: linear-gradient(150deg, rgba(30, 64, 175, 0.96), rgba(15, 118, 110, 0.9));
    padding: clamp(2.3rem, 3.5vw, 3.25rem);
    color: rgba(248, 250, 252, 0.95);
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25);
}

.auth-preview::after {
    content: "";
    position: absolute;
    inset: 12% -20% -30% -25%;
    background: radial-gradient(circle at center, rgba(56, 189, 248, 0.35) 0%, rgba(15, 118, 110, 0.05) 70%);
    opacity: 0.8;
    transform: rotate(8deg);
}

.auth-preview-inner {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: clamp(1.75rem, 3vw, 2.5rem);
}

.auth-preview-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.9rem 1.4rem;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.32);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.auth-preview-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-preview-brand-bullet {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.6);
}

.auth-preview-nav {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.85;
}

.auth-preview-nav span {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.16);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.auth-preview-content {
    display: grid;
    gap: 1.5rem;
}

.auth-preview-card {
    background: rgba(15, 23, 42, 0.32);
    border-radius: 22px;
    padding: 1.4rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    backdrop-filter: blur(14px);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-preview-card h2 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.03em;
}

.auth-preview-card p {
    margin: 0;
    color: rgba(226, 232, 240, 0.8);
    line-height: 1.55;
}

.auth-preview-metrics {
    display: grid;
    gap: 0.9rem;
}

.auth-preview-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.1rem;
    border-radius: 16px;
    background: rgba(15, 118, 110, 0.18);
    border: 1px solid rgba(148, 163, 184, 0.18);
    font-size: 0.95rem;
}

.auth-preview-metric strong {
    font-size: 1.05rem;
    color: #f8fafc;
    letter-spacing: 0.02em;
}

.auth-preview-team {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.auth-preview-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.35);
    display: grid;
    place-items: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.auth-form-card {
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    padding: clamp(2.25rem, 3vw, 3rem);
    max-width: 640px;
    width: 100%;
    margin: 0 auto;
}

.auth-form-card-single {
    max-width: 640px;
}

.auth-form-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.auth-form-logo {
    height: 56px;
    width: auto;
    display: block;
}

.auth-form-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    font-weight: 600;
    font-size: 0.82rem;
}

.auth-form-title {
    font-size: clamp(1.75rem, 3vw, 2.1rem);
    font-weight: 600;
    color: #0f172a;
    text-align: center;
    margin: 0;
}

.auth-form-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    text-align: center;
    max-width: 22rem;
}

.auth-form-fields {
    display: grid;
    gap: 1.25rem;
}

.auth-field .form-label {
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.4rem;
}

.auth-form .form-control {
    border-radius: 14px;
    border-color: rgba(148, 163, 184, 0.45);
    padding: 0.9rem 1.1rem;
    height: auto;
    width: 100%;
    display: block;
}

.auth-form .form-control:focus {
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 0 0.15rem rgba(59, 130, 246, 0.15);
}

.auth-form-help {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.88rem;
    color: #475569;
}

.auth-form .btn {
    border-radius: 14px;
    padding: 0.95rem 1.1rem;
    font-weight: 600;
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.18);
}

.auth-form .btn-primary {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    border: none;
}

.auth-form .btn-primary:hover {
    background: linear-gradient(135deg, #1e40af, #1d4ed8);
}

.auth-form-footnote {
    font-size: 0.82rem;
    color: #94a3b8;
    margin-top: 2.25rem;
    text-align: center;
}

.auth-form-footnote a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted rgba(148, 163, 184, 0.6);
}

.auth-form-footnote a:hover {
    color: #1d4ed8;
    border-bottom-color: rgba(59, 130, 246, 0.65);
}

.auth-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.auth-pill-list span {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: #1e293b;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

@media (max-width: 991.98px) {
    .auth-form-card {
        padding: clamp(2rem, 6vw, 2.5rem);
    }
}

.document-modal-open {
    overflow: hidden;
}

.document-viewer-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    z-index: 2000;
    transition: opacity 0.2s ease;
    opacity: 0;
    pointer-events: none;
}

.document-viewer-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.document-viewer-modal[hidden] {
    display: none;
}

.document-viewer-backdrop {
    position: absolute;
    inset: 0;
}

.document-viewer-dialog {
    position: relative;
    background: #0f172a;
    width: min(90vw, 1000px);
    height: min(85vh, 760px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(15, 23, 42, 0.35);
    display: flex;
    flex-direction: column;
}

.document-viewer-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.2rem;
    background: rgba(15, 23, 42, 0.85);
    color: #f8fafc;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    gap: 1rem;
}

.document-viewer-title {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.document-viewer-actions {
    display: flex;
    gap: 0.5rem;
}

.document-viewer-frame {
    flex: 1;
    background: #0f172a;
    padding: 0;
    overflow: auto;
}

.document-viewer-frame .pdf-viewer-container {
    padding: 1rem;
}

@media (max-width: 767.98px) {
    .document-viewer-dialog {
        width: calc(100vw - 1.5rem);
        height: calc(100vh - 2rem);
        border-radius: 16px;
    }

    .document-viewer-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .document-viewer-actions {
        justify-content: flex-end;
    }
}

.derived-actions-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.derived-action-card {
    position: relative;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 18px;
    padding: 1.1rem 1.25rem;
    padding-right: 2.5rem;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.derived-action-dismiss-form {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
}

.derived-action-dismiss-btn {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0.2rem;
    cursor: pointer;
}

.derived-action-dismiss-btn:hover,
.derived-action-dismiss-btn:focus {
    color: #dc2626;
    outline: none;
}

.derived-action-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.derived-action-entity {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.derived-action-priority {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    color: #1f2937;
}

.derived-action-priority.priority-hoch {
    color: #b91c1c;
    background: rgba(248, 113, 113, 0.15);
}

.derived-action-priority.priority-niedrig {
    color: #047857;
    background: rgba(16, 185, 129, 0.12);
}

.derived-action-association {
    background: rgba(148, 163, 184, 0.12);
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
}

.derived-action-card form .btn {
    border-radius: 12px;
}

.task-file-modal {
    position: fixed;
    inset: 0;
    z-index: 1055;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.task-file-modal.d-none {
    display: none !important;
}

.task-file-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.task-file-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(1000px, 92vw);
    height: min(720px, 92vh);
    background: #ffffff;
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.4);
    overflow: hidden;
}

.task-file-modal-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.02));
}

.task-file-modal-title {
    font-weight: 600;
    font-size: 1rem;
    color: #1e293b;
}

/* 06.10.2026: PDF im Layer-Fenster mit pdf.js (Zoom-Leiste oben, Seiten darunter scrollbar) */
.task-file-modal-pdf { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.task-file-modal-pdf.d-none { display: none; }
.task-file-modal-pdf .pdf-viewer-wrapper { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.task-file-modal-pdf .pdf-viewer-controls { flex: 0 0 auto; display: flex; gap: .4rem; align-items: center; padding: .5rem 1rem; border-bottom: 1px solid rgba(148, 163, 184, 0.2); background: #fff; }
.task-file-modal-pdf .pdf-viewer-container { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 1rem; background: #e2e8f0; }
.task-file-modal-pdf .pdf-page { flex: 0 0 auto; } /* Seiten nicht auf die Fensterhoehe stauchen */
.task-file-modal-body iframe.d-none { display: none; }

/* 06.10.2026: Download-Symbol im Layer-Fenster */
.task-file-modal-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-left: auto;
    margin-right: .25rem;
    border-radius: 8px;
    color: #475569;
    text-decoration: none;
}

.task-file-modal-download svg {
    width: 20px;
    height: 20px;
}

.task-file-modal-download:hover,
.task-file-modal-download:focus-visible {
    background: #f1f5f9;
    color: #0f172a;
}

.task-file-modal-download.d-none {
    display: none;
}

.task-file-modal-download + .task-file-modal-close {
    margin-left: 0;
}

.task-file-modal-close {
    border: none;
    background: rgba(148, 163, 184, 0.18);
    color: #0f172a;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    font-size: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.task-file-modal-close:hover,
.task-file-modal-close:focus {
    background: rgba(37, 99, 235, 0.18);
    color: #1d4ed8;
    outline: none;
}

.task-file-modal-body {
    flex: 1;
    min-height: 0;
    background: #f8fafc;
    padding: 0;
}

.task-file-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
}

.modal-open-simple {
    overflow: hidden;
}

.task-inline-image-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.task-inline-image {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.task-inline-image-header .icon {
    width: 1.2rem;
    height: 1.2rem;
}

.task-inline-image-header .btn-icon-square {
    width: 2.3rem;
    height: 2.3rem;
}

.task-inline-image-viewer img {
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
}

.task-file-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.task-file-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}



/* 29.09.2026: Aufgabenlisten in hellen Blautoenen statt Grau (gilt fuer alle Seiten) */
.task-table tbody tr:nth-child(odd) > * {
    background-color: #ffffff !important;
}

.task-table tbody tr:nth-child(even) > * {
    background-color: #f0f7fd !important;
}

.task-table tbody tr:hover > * {
    background-color: #e0f2fe !important;
}

.task-table .task-row-link {
    border-left: 3px solid #bae6fd;
}

.task-table .task-row-link:hover,
.task-table .task-row-link:focus {
    border-left-color: #0284c7;
}

.task-table .badge.bg-secondary-subtle {
    background-color: #e0f2fe !important;
    color: #075985 !important;
    border: 1px solid #bae6fd;
}

.ai-chat-history {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.ai-chat-entry {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ai-chat-meta {
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.ai-chat-meta-answer {
    justify-content: space-between;
}

.ai-chat-bubble {
    border-radius: 18px;
    padding: 0.85rem 1rem;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.5;
}

.ai-chat-bubble.ai-question {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.16), rgba(37, 99, 235, 0.16));
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.ai-chat-bubble.ai-answer {
    align-self: flex-start;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.24);
}

.ai-chat-form textarea {
    border-radius: 16px;
    resize: vertical;
    min-height: 120px;
}

.ai-chat-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #1d4ed8;
}

@media (max-width: 991.98px) {
    .auth-header {
        justify-content: flex-start;
        padding: 1.25rem 1.5rem;
    }

    .auth-branding {
        font-size: 1rem;
    }

    .auth-container {
        padding: clamp(4rem, 10vw, 5rem) clamp(1.5rem, 6vw, 2.5rem) clamp(2.5rem, 8vw, 3.5rem);
    }

    .auth-card {
        border-radius: 22px;
        padding: clamp(0.75rem, 3vw, 1.5rem);
    }

    .auth-form {
        padding: clamp(1.5rem, 6vw, 2.75rem);
    }
}

@media (max-width: 575.98px) {
    .auth-container {
        padding: clamp(3.5rem, 10vw, 4.5rem) 1.2rem clamp(2rem, 8vw, 3rem);
    }

    .auth-card {
        border-radius: 20px;
        padding: 1rem;
    }

    .auth-form {
        padding: 1.75rem;
    }

    .auth-form .form-control {
        border-radius: 14px;
    }

    .auth-form .btn {
        border-radius: 12px;
    }
}

.layout-container {
    max-width: 1280px;
    margin-left: 0;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

@media (max-width: 767.98px) {
    .layout-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

.card-header-collapse {
    border-bottom: none !important;
    background: rgba(248, 250, 252, 0.7);
    padding: 1rem 1.5rem;
    border-radius: 18px 18px 0 0;
}

.card-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0;
}

.card-toggle:focus {
    outline: none;
    color: #1d4ed8;
}

.card-toggle .toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    position: relative;
    top: -4px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    font-size: 0.95rem;
    transition: transform 0.2s ease, background 0.2s ease;
}

.card-toggle:not(.collapsed) .toggle-icon {
    transform: rotate(180deg);
}

.card-toggle:hover .toggle-icon,
.card-toggle:focus .toggle-icon {
    background: rgba(30, 64, 175, 0.18);
    color: #1e40af;
}

.activity-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.activity-entry {
    position: relative;
    padding-left: 1.75rem;
}

.activity-entry::before {
    content: '';
    position: absolute;
    left: 0.4rem;
    top: 0.25rem;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.activity-entry::after {
    content: '';
    position: absolute;
    left: 0.65rem;
    top: 0.9rem;
    width: 1px;
    height: calc(100% - 0.9rem);
    background: rgba(148, 163, 184, 0.35);
}

.activity-entry:last-child::after {
    display: none;
}

.activity-meta {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #475569;
}

.activity-text p {
    margin-bottom: 0.35rem;
    color: #1e293b;
}

.activity-detail-list {
    list-style: disc;
    margin-left: 1rem;
    color: #475569;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.user-toolbar {
    gap: 0.75rem;
    margin-top: 0.5rem;
    margin-bottom: 2.25rem;
}

.user-toolbar .toolbar-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #ffffff;
    color: #1d4ed8;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.user-toolbar .toolbar-link:hover,
.user-toolbar .toolbar-link:focus {
    border-color: rgba(37, 99, 235, 0.45);
    color: #1e40af;
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(30, 64, 175, 0.16);
}

.user-toolbar .toolbar-link-primary {
    border-color: transparent;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    color: #ffffff;
    box-shadow: 0 14px 36px rgba(37, 99, 235, 0.35);
}

.user-toolbar .toolbar-link-primary:hover,
.user-toolbar .toolbar-link-primary:focus {
    color: #ffffff;
    box-shadow: 0 18px 40px rgba(30, 64, 175, 0.4);
    transform: translateY(-1px);
}

.btn-icon {
    margin-right: 0.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.inbox-card .card-body {
    padding: 1.75rem 2rem;
}

@media (max-width: 576px) {
    .inbox-card .card-body {
        padding: 1.5rem 1.4rem;
    }
}

.form-panel {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    width: 100%;
    max-width: 940px;
    margin: 0 0 1.5rem 0;
    padding-left: 1.25rem;
    border-left: 1px solid rgba(148, 163, 184, 0.22);
}

.form-panel + .form-panel {
    margin-top: 1.25rem;
}

.form-panel .form-section-title {
    margin-bottom: 1.25rem;
}

.property-panel {
    margin-left: 1.5rem;
}

@media (max-width: 767px) {
    .property-panel {
        margin-left: 0;
    }
}

.manual-section {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    padding-left: 0;
    border-top: 1px dashed rgba(148, 163, 184, 0.45);
}

.manual-toggle-btn {
    font-weight: 600;
    color: #1d4ed8;
}

.manual-toggle-btn:hover,
.manual-toggle-btn:focus {
    color: #1e40af;
    text-decoration: none;
}

.back-link-wrapper {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.team-member-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    background: #f8fafc;
}

.team-member-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.team-member-option input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
}

.team-member-option:hover {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.15);
}

.upload-indicator {
    display: none;
    margin-top: 0.35rem;
}

.upload-indicator.active {
    display: block;
}

.upload-indicator.uploading {
    color: #1d4ed8;
    font-weight: 600;
    position: relative;
    padding-left: 1.5rem;
}

.upload-indicator.uploading::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 1rem;
    height: 1rem;
    margin-top: -0.5rem;
    border-radius: 50%;
    border: 2px solid rgba(37, 99, 235, 0.35);
    border-top-color: #1d4ed8;
    animation: upload-spin 0.75s linear infinite;
}

.property-document-actions {
    margin-top: 0;
}

.property-document-actions .btn {
    margin-top: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@keyframes upload-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.pdf-viewer-container {
    position: relative;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 16px;
    padding: 1.25rem;
    /* Kein max-height mehr: der Container waechst genau auf die Hoehe der
       gerenderten Seiten (fit-width sorgt fuer korrekte Skalierung, daher
       passt eine DIN A4-Seite vollstaendig ohne Leerraum darunter). */
    overflow: auto;
    cursor: grab;
    touch-action: pan-x pan-y;
    -ms-touch-action: none;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    /* iOS-Safari-Fix: padding-right wird beim horizontalen Scrollen
       nur respektiert, wenn der Inhalt als Flex-Container fließt. Sonst
       endet der scrollbare Bereich am Content, nicht am padding-right. */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .75rem;
}

.pdf-fallback-frame {
    width: 100%;
    min-height: 520px;
    border: none;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.25);
}

.pdf-spinner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #1d4ed8;
    font-weight: 600;
}

.pdf-viewer-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pdf-viewer-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.pdf-viewer-controls .btn {
    min-width: 2.25rem;
}

.pdf-viewer-scale {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.pdf-viewer-container.is-panning {
    cursor: grabbing;
}

.techlog-compare-table tbody th {
    vertical-align: top;
    white-space: nowrap;
}

.techlog-compare-table tbody td {
    vertical-align: top;
}

.techlog-compare-table input[disabled] {
    background-color: #f1f5f9;
    color: #475569;
}

.techlog-compare-table .badge {
    display: inline-block;
    margin-top: 0.5rem;
}

.techlog-compare-table .form-control,
.techlog-compare-table textarea {
    font-size: 0.875rem;
}

.nav-tabs-cards {
    border-bottom: none;
    gap: 0.5rem;
}

.nav-tabs-cards .nav-link {
    border: 1px solid transparent;
    border-bottom: none;
    background: #f1f5f9;
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: #475569;
    font-weight: 600;
}

.nav-tabs-cards .nav-link:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.nav-tabs-cards .nav-link.active {
    background: #ffffff;
    color: #0f172a;
    border-color: #cbd5f5 #cbd5f5 #ffffff;
    box-shadow: 0 -4px 14px rgba(15, 23, 42, 0.08);
    margin-bottom: -1px;
}

.pdf-spinner::before {
    content: "";
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(37, 99, 235, 0.35);
    border-top-color: #1d4ed8;
    border-radius: 50%;
    animation: upload-spin 0.75s linear infinite;
}

.pdf-page {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
}

.pdf-page canvas {
    /* Canvas-Groesse wird ausschliesslich per inline style aus JS gesteuert (pcZoomPdf / applyScale).
       Kein width/height hier, damit CSS-Regeln den Zoom nicht sabotieren. */
    display: block;
}

.pdf-error-message {
    color: #dc2626;
    font-weight: 600;
}

.form-grid {
    display: grid;
    gap: 1.2rem 1.5rem;
}

.form-grid.two-col {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .form-grid.two-col {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.form-grid.three-col {
    grid-template-columns: 1fr;
}

@media (min-width: 992px) {
    .form-grid.three-col {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.form-grid .span-2 {
    grid-column: span 1;
}

@media (min-width: 768px) {
    .form-grid .span-2 {
        grid-column: span 2;
    }
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.external-input {
    width: 100%;
    margin-top: 0.35rem;
}

.external-input input {
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.45);
}

.external-input input:focus {
    border-color: rgba(37, 99, 235, 0.7);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.1);
}

.info-grid {
    display: grid;
    gap: 1.5rem;
}

.info-grid.two-col {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .info-grid.two-col {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.info-card {
    background: #fff;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    padding: 1.25rem 1.5rem;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.info-card h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #1d4ed8;
    margin-bottom: 1rem;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.info-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 0.75rem;
    align-items: start;
}

@media (max-width: 576px) {
    .info-item {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }
}

.info-item dt {
    font-weight: 600;
    color: #64748b;
    margin: 0;
}

.info-item dd {
    margin: 0;
    color: #1e293b;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-list .tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.info-text-block {
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 18px;
    padding: 1.25rem 1.5rem;
    margin-top: 1.5rem;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.info-text-block h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #1d4ed8;
    margin-bottom: 0.75rem;
}

.info-text-block p {
    margin-bottom: 1rem;
    color: #1e293b;
}

.info-text-block p:last-child {
    margin-bottom: 0;
}

.topbar-secondary {
    background: transparent;
    border-bottom: none;
}


.topbar-brand {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #0b3d91 !important;
    text-decoration: none;
}

.topbar-brand.active {
    color: #0d6efd !important;
}

.topbar-link {
    color: #475569;
    text-decoration: none;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    transition: all 0.2s ease-in-out;
    letter-spacing: 0.05em;
}

.topbar-link.user-link {
    background: rgba(37, 99, 235, 0.12);
    color: #1e293b;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.topbar-link:hover,
.topbar-link:focus {
    background: rgba(13, 110, 253, 0.12);
    color: #0d6efd;
}

.topbar-link.active {
    background: rgba(13, 110, 253, 0.18);
    color: #0d6efd;
}



.topbar-divider {
    width: 1px;
    height: 20px;
    background: rgba(148, 163, 184, 0.4);
    display: inline-block;
}

.topbar-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    color: #fff;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.nav-tabs.nav-tabs-soft .nav-link.user-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-tabs.nav-tabs-soft .nav-link.user-link .topbar-avatar {
    width: 20px;
    height: 20px;
    font-size: 0.62rem;
}

.nav-link {
    font-weight: 500;
    color: #304056 !important;
    border-radius: 999px;
    padding: 0.45rem 0.95rem;
}

.nav-link.active, .nav-link:focus, .nav-link:hover {
    background: rgba(13, 110, 253, 0.12);
    color: #0d6efd !important;
}

/* Bootstrap Nav-Pills: Active-State lesbar machen (sonst: blau auf blau) */
.nav-pills .nav-link {
    border: 1px solid transparent;
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background: rgba(13, 110, 253, 0.14);
    color: #0d6efd !important;
    border: 1px solid rgba(13, 110, 253, 0.22);
}

.avatar-placeholder {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.35);
}

.avatar-placeholder.small {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
}

.card {
    border-radius: 16px;
    border: none;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
    background: #ffffff;
}

.card p,
.card li,
.card dd {
    overflow-wrap: anywhere;
}

.card .card-header {
    border-bottom: none;
    background: transparent;
    padding-bottom: 0;
}

.card .card-footer {
    border-top: none;
    background: transparent;
}

.form-actions-sticky {
    position: sticky;
    bottom: -1px;
    background: linear-gradient(180deg, rgba(255,255,255,0.8) 0%, #ffffff 60%);
    border-top: 1px solid rgba(148, 163, 184, 0.35);
    padding: 1rem 1.25rem;
    border-radius: 0 0 1rem 1rem;
    backdrop-filter: blur(6px);
    box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.08);
}

.form-actions-sticky .btn {
    min-width: 160px;
}

.table-responsive {
    border-radius: 16px;
}

.table-hover tbody tr:hover {
    background: rgba(13, 110, 253, 0.05);
}

.badge.bg-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #2563eb 100%) !important;
}

.btn-primary {
    background: linear-gradient(135deg, #1d4ed8 0%, #3182ce 100%);
    border: none;
    border-radius: 999px;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #fff;
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.35);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    box-shadow: 0 12px 28px rgba(30, 64, 175, 0.45);
}

.btn-outline-primary {
    color: #2563eb;
    border-color: rgba(37, 99, 235, 0.55);
}

.btn-outline-primary:hover {
    background: rgba(37, 99, 235, 0.1);
}

.form-control, .form-select, .form-check-input {
    border-radius: 12px;
    border-color: rgba(15, 23, 42, 0.12);
}

textarea.form-control {
    min-height: 120px;
}

.form-control:focus, .form-select:focus {
    border-color: rgba(37, 99, 235, 0.65);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.1);
}

.form-field .form-label {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0;
}

.form-field .form-text {
    margin-top: 0.25rem;
}

.form-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    color: #64748b;
}

.company-tree ul {
    margin: 0.75rem 0 0.75rem 1.25rem;
    padding-left: 0.75rem;
}

.company-tree li {
    margin-bottom: 0.75rem;
    position: relative;
}

.company-tree li::before {
    content: "";
    position: absolute;
    left: -0.95rem;
    top: 0.65rem;
    width: 12px;
    height: 2px;
    background: rgba(13, 110, 253, 0.25);
}

.company-tree .badge {
    font-size: 0.72rem;
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
}

.alert {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.alert .btn-close {
    width: 1.5rem;
    height: 1.5rem;
    opacity: 0.6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    line-height: 1;
}

.alert .btn-close:hover,
.alert .btn-close:focus {
    opacity: 1;
    color: #1e293b;
}

.login-hero {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-hero .badge {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.25);
}

.login-hero p {
    color: #475569;
}

.table thead th {
    border-bottom: none;
    color: #475569;
    font-weight: 600;
}

.table td {
    vertical-align: middle;
    color: #1e293b;
}

.table td small {
    color: #64748b;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f5f9ff 100%);
    border: 1px solid rgba(148, 163, 184, 0.15);
}

.stat-card .badge {
    background: rgba(37, 99, 235, 0.18);
    color: #1d4ed8;
}

.text-muted {
    color: #64748b !important;
}

footer {
    background: linear-gradient(135deg, #ffffff 0%, #f3f6ff 60%);
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    margin-top: 3rem;
}

@media (max-width: 576px) {
    header.navbar {
        position: sticky;
        top: 0;
        z-index: 1030;
        box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    }

    .nav-link {
        margin-bottom: 0.4rem;
    }
}
.list-group-flush .list-group-item {
    padding: 0.85rem 1.1rem;
}

.list-group-item .small {
    margin-top: 0.25rem;
    color: #64748b;
}

.list-group-item + .list-group-item {
    margin-top: 0.35rem;
    border-top: none;
}

.list-group-item-action {
    border-radius: 12px;
}

.list-group-item-action:hover,
.list-group-item-action:focus {
    background: rgba(37, 99, 235, 0.08);
}

.list-group-item-action.active {
    background: rgba(37, 99, 235, 0.15);
    border-color: transparent;
}
.loan-summary {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .loan-summary.two-col {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.loan-summary .info-card {
    padding: 1.4rem 1.6rem;
}

.loan-summary .info-item dt {
    width: 140px;
}

.loan-summary .info-item dd {
    color: #0f172a;
}

.loan-summary .info-item strong {
    color: #1d4ed8;
}

.loan-repayments-card {
    position: relative;
    overflow: hidden;
}

.loan-repayment-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 16px;
    padding: 1.1rem 1.4rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(37, 99, 235, 0.15);
}

.loan-repayment-summary .summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.loan-repayment-summary .summary-label {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(30, 64, 175, 0.8);
    font-weight: 600;
}

.loan-repayment-summary .summary-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e3a8a;
}

.loan-repayments-card table {
    border-radius: 14px;
    overflow: hidden;
}

.loan-repayments-card thead th {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #475569;
}

.loan-repayments-card tbody td {
    vertical-align: middle;
}

.loan-repayments-card tbody td:first-child {
    font-weight: 600;
}

.loan-repayment-form {
    background: #f8fafc;
    border: 1px dashed rgba(148, 163, 184, 0.6);
    border-radius: 16px;
    padding: 1.35rem;
}

.loan-repayment-form .form-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #475569;
}

.loan-repayment-form button {
    border-radius: 12px;
    white-space: normal;
    padding: 0.65rem 1rem;
    font-weight: 600;
}

.loan-repayment-form .form-text {
    font-size: 0.75rem;
    color: #64748b;
}

.loan-repayment-empty {
    padding: 0.75rem 1rem;
    border: 1px dashed rgba(148, 163, 184, 0.5);
    border-radius: 12px;
    background: #f8fafc;
    font-size: 0.9rem;
}

.discussion-entry {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 0.75rem;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.discussion-entry:last-child {
    border-bottom: none;
}

.discussion-entry-own {
    justify-items: end;
}

/* 06.10.2026: Initialen klein und flach statt als grosser Kreis mit Schatten; am Handy entfallen sie,
   weil der Name ohnehin im Beitrag steht. */
.discussion-avatar {
    width: 32px;
    height: 32px;
    margin-top: 0.35rem;
    border-radius: 50%;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #075985;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.discussion-avatar-own {
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #166534;
}

@media (max-width: 575.98px) {
    .discussion-entry {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .discussion-avatar {
        display: none;
    }

    .discussion-bubble::before,
    .discussion-bubble::after {
        display: none;
    }
}

.discussion-entry-own .discussion-avatar {
    grid-column: 1;
    order: -1;
    margin-bottom: 0.75rem;
    visibility: hidden;
}

.discussion-bubble {
    position: relative;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 18px;
    padding: 1.1rem 1.3rem;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
    width: min(100%, 900px);
    max-width: 100%;
}

.discussion-bubble::before,
.discussion-bubble::after {
    content: "";
    position: absolute;
    top: 18px;
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
}

.discussion-bubble::before {
    left: -12px;
    border-right: 12px solid rgba(255, 255, 255, 0.95);
}

.discussion-bubble::after {
    left: -13px;
    border-right: 12px solid rgba(148, 163, 184, 0.25);
}

.discussion-bubble-own {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-color: rgba(34, 197, 94, 0.35);
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.18);
}

.discussion-entry-own .discussion-bubble {
    margin-left: auto;
}

.discussion-entry-own .discussion-bubble::before {
    left: auto;
    right: -12px;
    border-right: none;
    border-left: 12px solid rgba(255, 255, 255, 0.95);
}

.discussion-entry-own .discussion-bubble::after {
    left: auto;
    right: -13px;
    border-right: none;
    border-left: 12px solid rgba(34, 197, 94, 0.25);
}

.discussion-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

.discussion-meta strong {
    font-size: 1rem;
    color: #0f172a;
}

/* 06.10.2026: Datum und Uhrzeit getrennt, Fusszeile mit „Antworten“ unten rechts, Antwortbezug */
.discussion-time {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #64748b;
    font-size: 0.82rem;
    white-space: nowrap;
}

.discussion-time::before {
    content: "·";
}

.discussion-clock {
    padding: 0.05rem 0.4rem;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    font-variant-numeric: tabular-nums;
}

.discussion-reply-ref {
    display: inline-block;
    margin-bottom: 0.5rem;
    padding: 0.15rem 0.55rem;
    border-left: 3px solid #bae6fd;
    background: #f0f9ff;
    color: #075985;
    font-size: 0.8rem;
    text-decoration: none;
    border-radius: 0 6px 6px 0;
}

.discussion-reply-ref:hover {
    background: #e0f2fe;
    color: #0c4a6e;
}

.discussion-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.6rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.discussion-footer-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 999px;
    background: #fff;
    color: #475569;
    font-size: 0.78rem;
    line-height: 1.2;
    cursor: pointer;
}

.discussion-footer-btn:hover,
.discussion-footer-btn:focus-visible {
    border-color: #0284c7;
    color: #075985;
    background: #f0f9ff;
}

.discussion-footer-btn svg {
    width: 14px;
    height: 14px;
}

.discussion-reply-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.35rem 0.6rem;
    border-left: 3px solid #bae6fd;
    background: #f0f9ff;
    color: #075985;
    font-size: 0.85rem;
    border-radius: 0 6px 6px 0;
}

/* 06.10.2026: Neu seit letztem Besuch, Aenderungsverlauf */
.discussion-entry-new .discussion-bubble {
    border-color: rgba(22, 163, 74, 0.45);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12), 0 14px 35px rgba(15, 23, 42, 0.08);
}

.discussion-new-summary {
    font-size: 0.85rem;
    color: #166534;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    text-decoration: none;
}

.discussion-new-summary:hover {
    background: #bbf7d0;
    color: #14532d;
}

.discussion-edited-toggle {
    border: 0;
    background: transparent;
    padding: 0;
    color: #64748b;
    font-size: 0.8rem;
    text-decoration: underline dotted;
    cursor: pointer;
}

.discussion-edited-toggle:hover {
    color: #0f172a;
}

.discussion-history {
    margin-bottom: 0.6rem;
}

.discussion-history-item {
    border-left: 3px solid #e2e8f0;
    background: #f8fafc;
    padding: 0.4rem 0.7rem;
    margin-bottom: 0.4rem;
    border-radius: 0 6px 6px 0;
}

.discussion-history-meta {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.2rem;
}

.discussion-history-text {
    font-size: 0.88rem;
    color: #334155;
}

.discussion-history-text p:last-child {
    margin-bottom: 0;
}

/* 06.10.2026: Anhaenge an Beitraegen */
.discussion-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.6rem;
}

.discussion-attachment {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    padding: 0.3rem 0.6rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 8px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 0.82rem;
    text-decoration: none;
}

.discussion-attachment:hover {
    border-color: #0284c7;
    background: #f0f9ff;
    color: #075985;
}

.discussion-attachment svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: #64748b;
}

.discussion-attachment-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 18rem;
}

.discussion-attachment-size {
    color: #64748b;
    white-space: nowrap;
}

.discussion-attachment-image {
    padding: 0;
    width: 120px;
    height: 120px;
    overflow: hidden;
    border-radius: 8px;
}

.discussion-attachment-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.discussion-attachment-field {
    margin-bottom: 0.75rem;
}

.discussion-reply-hint-clear {
    border: 0;
    background: transparent;
    color: #075985;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.discussion-meta-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.discussion-entry-own .discussion-meta,
.discussion-entry-own .discussion-meta-info {
    justify-content: flex-end;
    text-align: right;
}

.discussion-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.discussion-entry-own .discussion-edit-form form {
    text-align: right;
}

.discussion-entry-own .discussion-edit-form .d-flex {
    justify-content: flex-end;
}

.discussion-content p {
    margin-bottom: 0.4rem;
}

.discussion-content p:last-child {
    margin-bottom: 0;
}

.discussion-content ul,
.discussion-content ol {
    margin-bottom: 0.75rem;
    padding-left: 1.25rem;
}

.discussion-content ul li,
.discussion-content ol li {
    margin-bottom: 0.35rem;
}

.discussion-edit-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed rgba(148, 163, 184, 0.35);
}

.discussion-edit-form textarea {
    resize: vertical;
}

.discussion-content .mention {
    display: inline-flex;
    align-items: center;
    padding: 0 0.35rem;
    border-radius: 0.4rem;
    background: rgba(13, 110, 253, 0.15);
    color: #0d6efd;
    font-weight: 600;
}

.discussion-form .btn-group .btn {
    min-width: 2.5rem;
}

.inbox-table {
    border-radius: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.inbox-table table {
    border-collapse: separate;
    border-spacing: 0;
}

.inbox-table thead {
    background: linear-gradient(135deg, #f1f5ff 0%, #ffffff 60%);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: #475569;
}

.inbox-table tbody tr {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.inbox-table tbody tr:hover {
    background: rgba(37, 99, 235, 0.08) !important;
    transform: translateX(4px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.inbox-table td,
.inbox-table th {
    padding: 1rem 1.25rem;
    vertical-align: middle;
}

.inbox-date .fw-semibold {
    font-size: 1rem;
    color: #0f172a;
}

.inbox-subject {
    font-weight: 600;
    color: #0f172a;
    max-width: 280px;
}

.inbox-person span {
    font-size: 0.95rem;
}

.inbox-table .btn-outline-primary {
    border-radius: 999px;
    padding: 0.35rem 1.1rem;
}

.mention-suggestions {
    position: absolute;
    z-index: 2000;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 16px;
    padding: 0.35rem 0;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
    overflow: hidden;
}

.mention-suggestion-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 0.15rem;
    padding: 0.45rem 0.9rem;
    background: transparent;
    border: none;
    text-align: left;
    font-size: 0.9rem;
    color: #0f172a;
    cursor: pointer;
}

.mention-suggestion-item .suggestion-label {
    font-weight: 600;
}

.mention-suggestion-item .suggestion-meta {
    font-size: 0.75rem;
    color: #64748b;
}

.mention-suggestion-item:hover,
.mention-suggestion-item.is-active {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
}

.upload-preview {
    border: 1px dashed rgba(148, 163, 184, 0.45);
    border-radius: 16px;
    padding: 0.85rem 1rem;
    background: rgba(248, 250, 252, 0.65);
    font-size: 0.85rem;
    line-height: 1.4;
}

.upload-preview ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.upload-preview li {
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 12px;
    padding: 0.35rem 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.upload-preview .file-name {
    font-weight: 600;
    color: #1e293b;
}

.upload-preview .file-meta {
    color: #64748b;
    font-size: 0.75rem;
}

.upload-preview .file-remove {
    border: none;
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.upload-preview .file-remove:hover {
    background: rgba(220, 38, 38, 0.16);
    color: #b91c1c;
}

.btn-icon-square {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-square .icon {
    width: 1.1rem;
    height: 1.1rem;
    display: block;
    color: currentColor;
}

.btn-icon-square svg {
    width: 100%;
    height: 100%;
}

.table-row-hover {
    cursor: pointer;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.timeline-item {
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background-color: #fff;
}

.timeline-item-incoming {
    border-left: 4px solid #0d6efd;
}

.timeline-item-outgoing {
    border-left: 4px solid #20c997;
}

.ticket-message {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #212529;
}


.task-table .task-row-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.task-table .task-row-link:hover,
.task-table .task-row-link:focus {
    background: rgba(59, 130, 246, 0.08);
    transform: translateX(2px);
    text-decoration: none;
}

.task-table .task-row-link {
    position: relative;
    padding-right: 2.5rem; /* Platz fuer den Pfeil rechts */
}

/* 06.10.2026: Ein Pfeil „›“ rechts in der Mitte der Zeile als Hinweis, dass die Zeile zur Aufgabe fuehrt.
   Vorher stand das Zeichen zweimal (im HTML und per CSS) und rutschte unter die Marken. */
.task-row-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    line-height: 1;
    color: rgba(15, 23, 42, 0.35);
    display: inline-flex;
    align-items: center;
}

.task-row-arrow::after {
    content: '›';
}

.task-table .task-row-link:hover .task-row-arrow {
    color: #0284c7;
}

.task-row-title .task-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    flex: 0 0 1.35rem;
    color: #475569;
    margin-top: 0.1rem;
}

.task-row-title .task-title-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.task-row-meta .badge {
    font-size: 0.7rem;
}

.task-row-meta .task-attachment-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.95rem;
    height: 0.95rem;
    margin-right: 0.25rem;
    vertical-align: -0.15em;
}

.task-row-meta .task-attachment-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.task-row-meta .task-discussion-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.95rem;
    height: 0.95rem;
}

.task-row-meta .task-discussion-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.task-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.95rem;
    height: 0.95rem;
}

.task-status-icon-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.task-priority-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.95rem;
    height: 0.95rem;
}

.task-priority-icon-svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Unteraufgaben-Badges: lange Titel umbrechen, statt aus der Box zu laufen. */
.task-subtask-badges .badge {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
    text-align: left;
    line-height: 1.2;
}

.task-row-meta .text-muted {
    font-size: 0.75rem;
}
.table .actions-column {
    min-width: 170px;
    white-space: nowrap;
}

.table tbody td {
    vertical-align: middle;
}

/* Bitstamp: Zellrahmen nur in der Jahres-Detailtabelle */
body.bitstamp .bitstamp-detail-table td,
body.bitstamp .bitstamp-detail-table th {
    border: 1px solid #dee2e6 !important;
}

/* Bitstamp / Bitstamp FX: volle Breite mit kleinem Rand, auch Container lösen */
body.bitstamp .bitstamp-fx-wide,
body.bitstamp_fx .bitstamp-fx-wide {
    width: 98%;
    margin-left: 1%;
    margin-right: 1%;
    padding-left: 0;
    padding-right: 0;
}
body.bitstamp_fx .layout-container,
body.bitstamp_fx .container,
body.bitstamp_fx main.container-fluid {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 1% !important;
    padding-right: 1% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Immobilien: Übersichtstabelle über volle Breite */
body.page-properties .layout-container {
    max-width: 100%;
}

/* Immobilien: Wartungspläne und zugehörige Tabellen ebenfalls über volle Breite */
body.page-properties_maintenance .layout-container {
    max-width: 100%;
}

/* Aus Wartungsplänen geöffnete Detailseiten ebenfalls über volle Breite */
body.from-properties_maintenance .layout-container {
    max-width: 100%;
}

/* Tickets: Tabellenansicht über volle Seitenbreite bei gleichbleibenden Rändern */
body.page-tickets .layout-container {
    max-width: 100%;
}

/* Kfz: Importierte Fahrzeugtabelle ueber die volle verfuegbare Seitenbreite anzeigen. */
body.page-kfz .layout-container {
    max-width: 100%;
}

/* 29.09.2026: Unternehmen bearbeiten — Formularboxen ueber die volle Breite */
body.page-companies_edit .layout-container {
    max-width: 100%;
}

/* 29.09.2026: Mitarbeiter bearbeiten — Boxen ueber die volle Breite */
body.page-users_edit .layout-container {
    max-width: 100%;
}

/* Ticket-Detailseite: Inhalt ueber die volle verfuegbare Breite laufen lassen. */
body.page-ticket_view .layout-container {
    max-width: 100%;
}

body.page-ticket_view .ticket-message {
    overflow-x: auto;
}

body.page-ticket_view .ticket-message table {
    width: 100% !important;
    max-width: none !important;
}

/* Wartungspläne: stärkere Objekt-Hierarchie + konsistente Spaltenaufteilung */
body.page-properties_maintenance .properties-maintenance-group-header {
    padding: 0.55rem 0.8rem;
    border-left: 4px solid #0d6efd;
    background: linear-gradient(90deg, rgba(13, 110, 253, 0.08) 0%, rgba(13, 110, 253, 0.02) 100%);
    border-radius: 0.4rem;
}

body.page-properties_maintenance .properties-maintenance-group-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0a3d8f;
    letter-spacing: 0.01em;
}

body.page-properties_maintenance .properties-maintenance-group-count {
    font-weight: 600;
}

body.page-properties_maintenance .properties-maintenance-table {
    table-layout: fixed;
    width: 100%;
}

body.page-properties_maintenance .properties-maintenance-table .col-task {
    width: 40%;
}

body.page-properties_maintenance .properties-maintenance-table .col-status {
    width: 11%;
}

body.page-properties_maintenance .properties-maintenance-table .col-priority {
    width: 11%;
}

body.page-properties_maintenance .properties-maintenance-table .col-due {
    width: 10%;
}

body.page-properties_maintenance .properties-maintenance-table .col-assignee {
    width: 16%;
}

body.page-properties_maintenance .properties-maintenance-table .col-files {
    width: 5%;
}

body.page-properties_maintenance .properties-maintenance-table .col-action {
    width: 7%;
}

body.page-properties_maintenance .properties-maintenance-task-cell {
    padding-left: 1.5rem !important;
}

@media (max-width: 1200px) {
    body.page-properties_maintenance .properties-maintenance-table {
        table-layout: auto;
    }
}

/* Kompakte Fotovorschau auf der Aufgaben-Detailseite (05.10.2026) */
.task-thumb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.9rem;
}

.task-thumb {
    min-width: 0;
}

.task-thumb-button {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 10px;
    overflow: hidden;
    background: #f1f5f9;
    cursor: zoom-in;
}

.task-thumb-button:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.task-thumb-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.task-thumb-caption {
    margin-top: 0.35rem;
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-thumb-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.1rem 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
}

.task-thumb-actions {
    display: inline-flex;
    gap: 0.6rem;
}

.task-thumb-actions form {
    margin: 0;
}

/* 06.10.2026: Download und Loeschen bei Fotos und Videos als Symbol statt Text. */
.task-thumb-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem;
    border: 0;
    border-radius: 0.25rem;
    background: none;
    color: #64748b;
    line-height: 1;
}

.task-thumb-action .icon {
    width: 1rem;
    height: 1rem;
}

.task-thumb-action:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.task-thumb-delete {
    padding: 0.15rem;
    border: 0;
    background: none;
    color: #dc2626;
    font-size: inherit;
}

.task-thumb-delete:hover {
    background: #fee2e2;
    color: #b91c1c;
    text-decoration: none;
}

/* Videos auf der Aufgaben-Detailseite (05.10.2026) */
.task-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.task-video {
    margin: 0;
    min-width: 0;
}

.task-video video {
    display: block;
    width: 100%;
    max-height: 70vh;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    background: #0f172a;
}

.task-video figcaption {
    margin-top: 0.4rem;
}

.task-video-name {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-video-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: #64748b;
}

.task-video-meta form {
    margin: 0;
}
