:root {
    --content-max-width: 1120px;
    --bg: #f5f6f8;
    --card: #ffffff;
    --text: #172033;
    --muted: #667085;
    --border: #dde3ec;
    --primary: #b00020;
    --primary-dark: #8b001a;
    --soft: #fff2f4;
    --warning: #9a5b00;
    --warning-bg: #fff4db;
    --danger: #b42318;
    --danger-bg: #fff1f0;
    --ok: #067647;
    --ok-bg: #ecfdf3;
    --info-bg: #eef4ff;
    --info: #3538cd;
    --shadow: 0 10px 30px rgba(16, 24, 40, .06);
    --radius: 18px;
}

.evidence-filter {
    display: grid;
    gap: 10px;
    align-items: end;
    grid-template-columns:
        minmax(260px, 1.25fr)
        minmax(220px, .9fr)
        minmax(260px, 1fr);
}

.evidence-filter label {
    margin-top: 0;
}

.evidence-filter-actions {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    white-space: nowrap;
}

.evidence-filter-actions button,
.evidence-filter-actions .button {
    width: auto;
}

.inline-filter.evidence-admin-type-filter {
    align-items: end;
    grid-template-columns: minmax(320px, 420px) auto;
    justify-content: start;
}

.inline-filter.evidence-admin-type-filter select {
    min-width: 320px;
}

.evidence-admin-active {
    align-self: end;
    margin-bottom: 4px;
}

.evidence-admin-technical {
    margin-top: 10px;
}

.evidence-admin-technical summary {
    color: var(--muted);
    cursor: pointer;
    font-size: .9rem;
    font-weight: 700;
}

.evidence-form-card {
    margin-bottom: 14px;
}

.evidence-checklist {
    display: grid;
    gap: 12px;
}

.evidence-check-section {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(16, 24, 40, .04);
    overflow: clip;
}

.evidence-check-section summary {
    align-items: center;
    background: #f8fafc;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    gap: 10px;
    font-weight: 800;
    justify-content: space-between;
    min-height: 50px;
    padding: 13px 16px;
}

.evidence-check-section summary::-webkit-details-marker {
    display: none;
}

.evidence-section-chevron {
    border-bottom: 2px solid currentColor;
    border-right: 2px solid currentColor;
    color: #667085;
    flex: 0 0 auto;
    height: 8px;
    margin-left: 2px;
    transform: rotate(-45deg);
    transition: transform .16s ease;
    width: 8px;
}

.evidence-check-section[open] .evidence-section-chevron {
    color: #fff;
    transform: rotate(45deg);
}

.evidence-section-title {
    flex: 1 1 auto;
    min-width: 0;
}

.evidence-section-meta {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    gap: 8px;
}

.evidence-section-progress {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 750;
    white-space: nowrap;
}

.evidence-section-complete {
    align-items: center;
    background: var(--ok-bg);
    border: 1px solid #abefc6;
    border-radius: 999px;
    color: var(--ok);
    display: none;
    font-size: .82rem;
    height: 24px;
    justify-content: center;
    line-height: 1;
    width: 24px;
}

.evidence-check-section.is-complete .evidence-section-complete {
    display: inline-flex;
}

.evidence-check-section[open] {
    display: grid;
    gap: 12px;
    padding: 0 12px 12px;
}

.evidence-check-section[open] summary {
    background: var(--primary);
    border-radius: 10px 10px 8px 8px;
    color: #fff;
    margin: 0 -12px;
}

.evidence-check-section[open] .evidence-section-progress {
    color: rgba(255, 255, 255, .86);
}

.evidence-check-section[open] .evidence-section-complete {
    background: #fff;
    border-color: rgba(255, 255, 255, .72);
    color: var(--ok);
}

.evidence-check-item {
    background: #fbfcfe;
    border: 1px solid #e8edf4;
    border-radius: 10px;
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 16px 14px 14px;
}

.evidence-check-section summary + .evidence-check-item {
    margin-top: 0;
}

.evidence-check-item-head {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-weight: 700;
    line-height: 1.25;
    min-width: 0;
}

.evidence-check-item.has-error {
    background: #fffbfa;
    border-color: #fecdca;
}

.evidence-check-item .small {
    color: #667085;
    font-size: .86rem;
    margin: -2px 0 0;
}

.evidence-answer-options {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0;
}

.evidence-answer-options label {
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: #344054;
    display: inline-flex;
    font-size: .9rem;
    gap: 6px;
    margin: 0;
    min-height: 30px;
    min-width: 112px;
    padding: 4px 9px;
}

.evidence-answer-options input {
    height: 17px;
    width: 17px;
}

.evidence-answer-options label:has(input:checked) {
    background: #eef4ff;
    border-color: #c7d7fe;
    color: var(--info);
}

.evidence-answer-options label:has(input[value="done"]:checked) {
    background: var(--ok-bg);
    border-color: #abefc6;
    color: var(--ok);
}

.evidence-answer-options label:has(input[value="na"]:checked) {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #344054;
}

.button.ghost.small.evidence-note-toggle,
button.ghost.small.evidence-note-toggle {
    background: transparent;
    border: 0;
    box-shadow: none;
    color: var(--muted);
    justify-self: start;
    min-height: 0;
    padding: 3px 0;
    text-decoration: underline;
}

.button.ghost.small.evidence-note-toggle:hover,
button.ghost.small.evidence-note-toggle:hover {
    background: transparent;
    color: var(--text);
    text-decoration: underline;
}

.evidence-note-wrap {
    display: grid;
    gap: 5px;
    margin-top: 2px;
}

.evidence-note-wrap.is-required {
    background: #fffbeb;
    border: 1px solid #fedf89;
    border-radius: 10px;
    padding: 10px;
}

.evidence-note-required-hint {
    color: #8a4b00;
    margin: -2px 0 2px;
}

.evidence-note-wrap[hidden] {
    display: none;
}

.evidence-checklist-editor {
    display: grid;
    gap: 14px;
}

.evidence-create-choice,
.evidence-create-form {
    display: grid;
    gap: 12px;
}

.evidence-create-form {
    max-width: 520px;
}

.evidence-table-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 0;
}

.evidence-table-actions .button.small {
    border-radius: 9px;
    min-height: 34px;
    padding: 6px 10px;
    white-space: nowrap;
}

.evidence-mobile-cards {
    display: none;
}

.evidence-mobile-card {
    background: #fbfcfe;
    border: 1px solid var(--border);
    border-radius: 10px;
    display: grid;
    gap: 10px;
    padding: 12px;
}

.evidence-mobile-card-head {
    align-items: flex-start;
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.evidence-mobile-card-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr 1fr;
}

.evidence-mobile-card-grid span {
    color: var(--muted);
    display: block;
    font-size: .78rem;
    font-weight: 750;
}

.evidence-mobile-card-grid strong {
    display: block;
    margin-top: 2px;
}

.evidence-mobile-card-actions {
    margin-top: 0;
}

.evidence-vehicle-item {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.evidence-status-info {
    color: var(--info);
    background: var(--info-bg);
    border-color: #c7d7fe;
    white-space: nowrap;
}

.evidence-answer-note {
    margin-top: 4px;
}

.evidence-answer-note strong {
    color: var(--text);
    font-weight: 750;
}

.evidence-protocol-checklist {
    display: grid;
    gap: 14px;
}

.evidence-protocol-section {
    display: grid;
    gap: 8px;
}

.evidence-protocol-section h3 {
    border-bottom: 1px solid #e7edf5;
    color: #344054;
    font-size: 1rem;
    margin: 0;
    padding-bottom: 6px;
}

.evidence-protocol-items {
    display: grid;
    gap: 8px;
}

.evidence-protocol-item {
    background: #fbfcfe;
    border: 1px solid #e8edf4;
    border-radius: 10px;
    padding: 12px;
}

.evidence-protocol-item-head {
    align-items: flex-start;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.evidence-protocol-item-head .badge {
    white-space: nowrap;
}

.evidence-admin-check-section {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.evidence-admin-check-section h3 {
    margin: 0;
}

.evidence-admin-check-list {
    display: grid;
    gap: 0;
    border-top: 1px solid var(--border);
}

.evidence-admin-check-item {
    align-items: start;
    border-bottom: 1px solid #eef2f6;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 10px 0;
}

.evidence-admin-check-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: flex-end;
}

.evidence-editor-list {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.evidence-editor-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    display: grid;
    gap: 9px;
    padding: 12px;
}

.evidence-editor-item-head {
    align-items: center;
    border-bottom: 1px solid #eef2f6;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding-bottom: 6px;
}

.evidence-editor-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(180px, .8fr) minmax(260px, 1.4fr) minmax(110px, .35fr);
}

.evidence-editor-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.evidence-confirmation-text {
    margin-top: 4px;
}

.evidence-signature-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.evidence-signature-box {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
}

.evidence-signature-head {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 8px;
}

.evidence-signature-person {
    margin: 3px 0 0;
}

.evidence-signature-field {
    position: relative;
}

.evidence-signature-canvas {
    background: #fff;
    border: 1px dashed var(--border);
    border-radius: 6px;
    height: 210px;
    touch-action: none;
    width: 100%;
}

.evidence-signature-guide {
    bottom: 14px;
    left: 24px;
    pointer-events: none;
    position: absolute;
    right: 24px;
}

.evidence-signature-line {
    border-top: 1px solid #98a2b3;
    display: block;
}

.evidence-signature-guide-name {
    color: var(--muted);
    display: block;
    font-size: .82rem;
    margin-top: 4px;
    text-align: center;
}

.evidence-signature-clear {
    margin-top: 8px;
}

.evidence-existing-signature,
.evidence-signature-readonly {
    display: grid;
    gap: 8px;
}

.evidence-existing-signature img,
.evidence-signature-readonly img {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    max-height: 170px;
    max-width: 100%;
    object-fit: contain;
}

.evidence-protocol-head {
    align-items: start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.evidence-meta-grid {
    margin-top: 12px;
}

.evidence-meta-grid span {
    line-height: 1.25;
    overflow-wrap: anywhere;
    text-transform: none;
}

@media (max-width: 720px) {
    .evidence-filter,
    .inline-filter.evidence-admin-type-filter {
        grid-template-columns: 1fr;
    }

    .inline-filter.evidence-admin-type-filter select {
        min-width: 0;
    }

    .evidence-filter-actions {
        justify-content: flex-start;
    }

    .evidence-check-section[open] {
        padding: 0 10px 10px;
    }

    .evidence-check-section summary {
        align-items: flex-start;
        min-height: 48px;
        padding: 12px;
    }

    .evidence-check-section[open] summary {
        margin: 0 -10px;
    }

    .evidence-section-meta {
        gap: 6px;
    }

    .evidence-section-progress {
        font-size: .76rem;
    }

    .evidence-check-item {
        padding: 12px;
    }

    .evidence-check-item-head {
        font-size: .98rem;
        line-height: 1.3;
    }

    .evidence-answer-options {
        gap: 8px;
    }

    .evidence-answer-options label {
        flex: 1 1 150px;
        min-width: 0;
    }

    .evidence-overview-table {
        display: none;
    }

    .evidence-mobile-cards {
        display: grid;
        gap: 10px;
    }

    .evidence-mobile-card-grid {
        grid-template-columns: 1fr;
    }

    .evidence-protocol-item-head {
        flex-direction: column;
        gap: 6px;
    }

    .evidence-admin-check-item {
        grid-template-columns: 1fr;
    }

    .evidence-admin-check-badges {
        justify-content: flex-start;
    }

    .evidence-editor-grid {
        grid-template-columns: 1fr;
    }

    .evidence-protocol-head,
    .evidence-signature-head {
        align-items: stretch;
        flex-direction: column;
    }
}

@media print {
    .topbar,
    .footer,
    .page-actions,
    .no-print,
    .back-to-top {
        display: none !important;
    }

    body {
        background: #fff;
    }

    .container {
        max-width: none;
        padding: 0;
    }

    .card {
        border: 0;
        box-shadow: none;
        break-inside: avoid;
    }
}

/* Mitglieder-Onboarding */
body.onboarding-open { overflow: hidden; }
body.onboarding-open.onboarding-reveal-scroll { overflow: auto; }
body.onboarding-menu-open .topbar { z-index: 1202; }
body.onboarding-menu-open [data-onboarding-target="main-menu"],
body.onboarding-menu-open .nav-admin-menu,
body.onboarding-menu-open .nav-mobile { pointer-events: none; }
.onboarding-backdrop { position: fixed; z-index: 1200; inset: 0; background: rgba(18, 29, 40, .58); }
.onboarding-backdrop.has-cutout { background: transparent; }
.onboarding-cutout-shade { position: absolute; background: rgba(18, 29, 40, .58); }
.onboarding-overlay { position: fixed; z-index: 1205; inset: 0; display: grid; align-items: end; justify-items: center; padding: 24px 24px 32px; pointer-events: none; }
.onboarding-card { position: relative; width: min(560px, 100%); max-height: min(620px, calc(100dvh - 56px)); overflow: auto; padding: 28px; border-radius: 18px; color: #193044; background: #fff; box-shadow: 0 24px 70px rgba(0, 0, 0, .35); pointer-events: auto; }
.onboarding-card:focus { outline: none; }
.onboarding-card h2 { margin: 18px 0 10px; font-size: 1.45rem; }
.onboarding-card p { margin: 0; line-height: 1.55; }
.onboarding-progress { display: flex; align-items: center; gap: 12px; color: #587084; font-size: .9rem; }
.onboarding-progress span:first-child { display: block; flex: 1; height: 7px; overflow: hidden; border-radius: 99px; background: #e4ebf0; font-size: 0; }
.onboarding-progress span[data-onboarding-progress] { --onboarding-progress: 0%; background: linear-gradient(90deg, #b42318 var(--onboarding-progress), #e4ebf0 var(--onboarding-progress)); }
.onboarding-finish-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.onboarding-actions { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 26px; }
.onboarding-actions-main { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px; }
.onboarding-actions .link-button { order: -1; padding: 8px 0; color: #52687a; background: transparent; border: 0; box-shadow: none; font: inherit; font-weight: 700; text-decoration: underline; }
.onboarding-actions .link-button:hover, .onboarding-actions .link-button:active { color: #354a5e; background: transparent; box-shadow: none; }
.onboarding-actions .link-button:focus-visible { outline: 3px solid #7bb7e6; outline-offset: 3px; border-radius: 4px; }
.onboarding-abort-confirm { margin-top: 20px; padding: 16px; border-radius: 12px; background: #f4f7fa; }
.onboarding-abort-confirm p { font-size: .95rem; }
.onboarding-abort-actions { display: flex; justify-content: end; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.onboarding-abort-button { color: #7b1e1e; background: #fff; border: 1px solid #d9a7a7; box-shadow: none; }
.onboarding-abort-button:hover, .onboarding-abort-button:active { color: #661414; background: #fff4f4; box-shadow: none; }
.onboarding-card.is-confirming-abort .onboarding-actions { display: none; }
.onboarding-spotlight-frame { position: fixed; z-index: 1204; border: 3px solid rgba(255, 255, 255, .98); border-radius: 10px; box-shadow: 0 0 0 7px rgba(255, 255, 255, .28), 0 12px 26px rgba(0, 0, 0, .18); pointer-events: none; }
.onboarding-spotlight { pointer-events: none; }
#contact-email, #notification-settings, #pwa-install { scroll-margin-top: 94px; }
@media (max-width: 760px) {
    .onboarding-overlay { align-items: end; padding: 12px max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
    .onboarding-card { width: min(640px, 100%); max-height: min(68dvh, calc(100dvh - env(safe-area-inset-top) - 24px)); margin: 0; padding: 20px; border-radius: 22px 22px 18px 18px; }
    .onboarding-card h2 { margin-top: 14px; font-size: 1.25rem; }
    .onboarding-card p { font-size: 1rem; line-height: 1.45; }
    .onboarding-actions { display: flex; flex-direction: column; align-items: stretch; margin-top: 20px; }
    .onboarding-actions-main { display: grid; grid-template-columns: 1fr; width: 100%; }
    .onboarding-actions button, .onboarding-finish-actions button { width: 100%; min-height: 44px; }
    .onboarding-actions .link-button { order: 2; width: auto; min-height: 34px; margin-top: 2px; }
    .onboarding-finish-actions { display: grid; grid-template-columns: 1fr; }
    .onboarding-abort-actions { display: grid; grid-template-columns: 1fr; }
    .onboarding-abort-actions button { width: 100%; min-height: 44px; }
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.45;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(255,255,255,.94);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-home {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--text);
    text-decoration: none;
}
.brand-home img {
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    border-radius: 6px;
}
.brand-home strong {
    font-size: 1.08rem;
    font-weight: 800;
}
.brand a { color: var(--text); text-decoration: none; }
.brand span { color: var(--muted); font-size: .88rem; }
.brand .brand-beta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 20px;
    padding: 3px 8px 3px 7px;
    border-radius: 999px;
    background: #fff7f8;
    border: 1px solid #f4c7cf;
    color: var(--primary-dark);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    font-size: .68rem;
    font-weight: 750;
    letter-spacing: 0;
    line-height: 1;
    text-transform: uppercase;
}
.brand .brand-beta::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 3px rgba(176, 0, 32, .08);
}
.testsystem-edge-marker {
    display: none;
}
.header-search {
    display: flex;
    align-items: center;
    min-width: 0;
    height: 42px;
}
.header-search input[type="search"] {
    min-width: 0;
    height: 42px;
    border-radius: 999px 0 0 999px;
    padding: 8px 12px;
    font-size: .9rem;
    border-right: 0;
}
.header-search button {
    min-width: 40px;
    height: 42px;
    border-radius: 0 999px 999px 0;
    padding: 0 10px;
    background: #f0f2f5;
    color: var(--text);
    justify-content: center;
    border: 1px solid var(--border);
    border-left: 0;
}
.header-search button:hover {
    background: #e8ebf0;
}
.header-search button.nav-current,
.header-search button.nav-current:hover {
    background: var(--primary);
    color: #fff;
}
.header-search button svg {
    display: block;
    width: 14px;
    height: 14px;
    margin: 0 auto;
    fill: currentColor;
}
.search-page-row {
    display: flex;
    align-items: center;
}
.search-page-row input[type="search"] {
    border-radius: 12px 0 0 12px;
}
.search-page-row button {
    min-width: 44px;
    border-radius: 0 12px 12px 0;
}
.search-scope-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 4px;
}
.search-scope-filter label {
    margin: 0;
}
.search-scope-filter input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.search-scope-filter span {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: .9rem;
    font-weight: 700;
}
.search-scope-filter input:checked + span {
    border-color: #f4b6c0;
    background: var(--soft);
    color: var(--primary-dark);
}
.search-scope-filter input:focus-visible + span {
    outline: 3px solid rgba(176, 0, 32, .2);
    outline-offset: 2px;
}
.checkbox-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}
.checkbox-line input {
    width: auto;
}
.desktop-header-search,
.mobile-header-search {
    display: none;
}
.nav { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.nav a,
.nav-admin summary,
.nav-mobile-section summary,
.nav-mobile a {
    white-space: nowrap;
    color: var(--text);
    background: #f0f2f5;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 8px 11px;
    font-size: .9rem;
}
.nav a:hover,
.nav-admin summary:hover,
.nav-mobile-section summary:hover,
.nav-mobile a:hover { background: #e8ebf0; text-decoration: none; }
.nav-mobile-head,
.nav-mobile {
    display: none;
}
.nav-mobile-head-compact {
    justify-content: flex-end;
}
.nav-admin {
    position: relative;
}
.nav-admin summary {
    list-style: none;
    cursor: pointer;
}
.nav-admin summary::-webkit-details-marker { display: none; }
.nav-admin-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;
    display: grid;
    gap: 6px;
    min-width: 170px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow);
}
.nav-admin:not([open]) .nav-admin-menu {
    display: none;
}
.nav-admin-menu a {
    width: 100%;
}
.nav-admin-menu.nav-rich-menu {
    gap: 0;
    min-width: min(318px, calc(100vw - 32px));
    padding: 8px;
    border-color: #d6dde8;
    border-radius: 16px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, .11);
}
.nav-admin-menu.nav-admin-plain-menu {
    min-width: min(238px, calc(100vw - 32px));
}
.nav-rich-menu::before {
    content: "";
    position: absolute;
    top: -7px;
    right: 42px;
    width: 13px;
    height: 13px;
    background: #fff;
    border-top: 1px solid #d6dde8;
    border-left: 1px solid #d6dde8;
    transform: rotate(45deg);
}
.nav .nav-rich-item,
.nav-mobile .nav-rich-item {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 7px 9px;
    border-radius: 12px;
    background: transparent;
    color: var(--text);
    font-size: .92rem;
    font-weight: 650;
    line-height: 1.2;
    text-align: left;
    white-space: normal;
}
.nav .nav-admin-plain-menu > a:not(.nav-rich-item) {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 9px 11px;
    border-radius: 12px;
    background: transparent;
    color: var(--text);
    font-size: .9rem;
    font-weight: 560;
    line-height: 1.2;
    text-align: left;
    white-space: normal;
}
.nav .nav-rich-item + .nav-rich-item,
.nav-mobile .nav-rich-item + .nav-rich-item,
.nav .nav-admin-plain-menu > a:not(.nav-rich-item) + a:not(.nav-rich-item) {
    border-top: 1px solid #edf0f4;
}
.nav .nav-rich-item:hover,
.nav .nav-rich-item:focus-visible,
.nav-mobile .nav-rich-item:hover,
.nav-mobile .nav-rich-item:focus-visible,
.nav .nav-admin-plain-menu > a:not(.nav-rich-item):hover,
.nav .nav-admin-plain-menu > a:not(.nav-rich-item):focus-visible {
    background: #f8fafc;
    text-decoration: none;
}
.topbar .nav .nav-rich-item.nav-current,
.topbar .nav-mobile .nav-rich-item.nav-current,
.topbar .nav .nav-admin-plain-menu > a.nav-current {
    background: #fff5f6;
    color: var(--primary-dark);
    border-color: rgba(176, 0, 32, .18);
}
.topbar .nav .nav-rich-item.nav-current:hover,
.topbar .nav-mobile .nav-rich-item.nav-current:hover,
.topbar .nav .nav-admin-plain-menu > a.nav-current:hover {
    background: #fff0f2;
}
.nav-rich-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 0;
    background: transparent;
    color: var(--text);
    box-shadow: none;
    overflow: visible;
}
.nav-rich-icon-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}
.nav-rich-icon-svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}
.nav-rich-icon-svg .icon-accent {
    stroke: var(--primary);
}
.nav-rich-icon-svg .icon-dotted {
    stroke-dasharray: .1 2.35;
    stroke-linecap: round;
}
.nav-rich-label {
    min-width: 0;
    overflow-wrap: anywhere;
}
.menu-toggle {
    position: relative;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    background: #eef1f5;
    color: var(--text);
}
.menu-toggle:hover {
    background: #e3e7ee;
}
.menu-toggle span[aria-hidden="true"],
.menu-toggle span[aria-hidden="true"]::before,
.menu-toggle span[aria-hidden="true"]::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
}
.menu-toggle span[aria-hidden="true"] {
    position: relative;
}
.menu-toggle span[aria-hidden="true"]::before,
.menu-toggle span[aria-hidden="true"]::after {
    content: "";
    position: absolute;
    left: 0;
}
.menu-toggle span[aria-hidden="true"]::before { top: -6px; }
.menu-toggle span[aria-hidden="true"]::after { top: 6px; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container { width: min(var(--content-max-width), 100%); margin: 0 auto; padding: 18px 14px 48px; }
.footer { color: var(--muted); font-size: .82rem; padding: 26px 14px; text-align: center; }
.footer-slogan {
    margin-bottom: 6px;
    color: var(--text);
    font-size: 1rem;
    font-weight: 750;
    line-height: 1.3;
}
.footer-description {
    margin-bottom: 4px;
    color: var(--muted);
    line-height: 1.35;
}
.footer-meta {
    color: var(--muted);
}
.footer a {
    color: inherit;
}

@media (max-width: 640px) {
    .footer-description-detail {
        display: block;
    }
}

h1 { font-size: 1.55rem; line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 1.15rem; margin: 0 0 12px; }
h3 { font-size: 1rem; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.small { color: var(--muted); font-size: .9rem; }
.muted { color: var(--muted); }
.danger-text { color: var(--danger); }
.mt-1 { margin-top: 8px; }
.warning-text {
    color: var(--warning);
    background: var(--warning-bg);
    border-radius: 10px;
    padding: 8px 10px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 14px;
    max-width: 100%;
    min-width: 0;
}
.grid > * {
    min-width: 0;
}
.grid > .card,
.grid > .kpi,
.grid > section.card {
    margin-bottom: 0;
    min-height: 100%;
}
.card.compact { padding: 12px; }
.muted-card { background: #fbfcfe; }
.grid { display: grid; gap: 14px; margin-bottom: 14px; max-width: 100%; }
.dashboard-kpis { margin-bottom: 18px; }
.grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

.kpi {
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--text);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow);
}
.kpi:hover {
    border-color: #c7cfdb;
    text-decoration: none;
}
.kpi strong { display: block; font-size: 1.7rem; line-height: 1.1; color: var(--text); }
.kpi span { color: var(--muted); font-size: .9rem; }
.kpi-alert strong { color: var(--danger); }

.list { display: grid; gap: 10px; }
.item {
    display: block;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
}
.item:hover { text-decoration: none; border-color: #c7cfdb; }
.item-muted {
    background: #fbfcfe;
    opacity: .62;
}
.item-muted:hover { opacity: .78; }
.scheduled-task-preview {
    background: #fafaf8;
    border-style: dashed;
    border-color: #d7dbd4;
    color: #475467;
}
.scheduled-task-preview:hover {
    border-color: #d7dbd4;
}
.scheduled-task-preview .item-title {
    color: #344054;
}
.item-title { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-weight: 750; color: var(--text); }
.item-title-text {
    min-width: 0;
    overflow: hidden;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}
.item-title > .item-title-text {
    flex: 1 1 220px;
}
.item-title .badge {
    flex: 0 0 auto;
}
.task-reminder-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid #f2c94c;
    border-radius: 999px;
    background: #fff6c9;
    color: #8a5a00;
    flex: 0 0 auto;
}
.task-reminder-icon {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.item-meta { color: var(--muted); font-size: .88rem; margin-top: 4px; overflow-wrap: anywhere; }
.item-context,
.process-start-values,
.linked-processes,
.context-description a,
.comment-entry a,
.comment-embedded-user-text a,
.warning-box a {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.item-context { color: var(--muted); font-size: .86rem; margin-top: 5px; line-height: 1.35; }
.char-counter {
    text-align: right;
    margin-top: 4px;
}
.char-counter.is-over-limit {
    color: var(--danger);
    font-weight: 700;
}
.item-actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: .78rem;
    font-weight: 700;
    border: 1px solid transparent;
}
.badge.success { color: #067647; background: #ecfdf3; border-color: #abefc6; }
.badge.warning { color: #b54708; background: #fffaeb; border-color: #fedf89; }
.badge.danger { color: var(--danger); background: var(--danger-bg); border-color: #fecdca; }
.badge.muted { color: var(--muted); background: #f3f5f8; border-color: var(--border); }
.movement-status-link {
    text-decoration: none;
}
.movement-status-link:hover,
.movement-status-link:focus {
    text-decoration: none;
    filter: brightness(.97);
}
.status-open { color: var(--info); background: var(--info-bg); }
.status-pending { color: var(--warning); background: var(--warning-bg); }
.status-terminationpending { color: var(--warning); background: var(--warning-bg); }
.status-claimed { color: var(--warning); background: var(--warning-bg); }
.status-done { color: var(--ok); background: var(--ok-bg); }
.status-bypass { color: var(--info); background: var(--info-bg); }
.status-returned, .status-cancelled { color: var(--danger); background: var(--danger-bg); }
.status-escalated { color: var(--danger); background: var(--danger-bg); }
.process-template-badge {
    color: #344054;
    background: #f8fafc;
    border-color: #d0d5dd;
    font-weight: 650;
}
.process-blocking-badge {
    color: #fff;
    background: var(--danger);
    border-color: #b42318;
    font-weight: 800;
    box-shadow: 0 0 0 1px rgba(180, 35, 24, .08);
}
.status-archived { color: var(--muted); background: #eef1f5; }
.badge-overdue { color: var(--danger); background: var(--danger-bg); }
.badge-soft { color: var(--primary); background: var(--soft); }
.badge-planned {
    color: #475467;
    background: #f2f4f2;
    border-color: #d7dbd4;
}

.flash {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 14px;
    border: 1px solid var(--border);
    background: #fff;
}
.flash-content {
    flex: 1 1 320px;
}
.flash-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.copy-feedback {
    min-width: 70px;
}
.pwa-install-card {
    position: relative;
}
.icon-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 999px;
    background: #eef1f5;
    color: var(--text);
    font-size: 1.15rem;
    line-height: 1;
}
.icon-close:hover {
    background: #e3e7ee;
}
.flash-success { background: var(--ok-bg); color: var(--ok); border-color: #abefc6; }
.flash-error { background: var(--danger-bg); color: var(--danger); border-color: #fecdca; }
.flash-info { background: var(--info-bg); color: var(--info); border-color: #c7d7fe; }

form { margin: 0; }
label { display: block; font-weight: 700; margin: 12px 0 6px; }
.required-mark {
    color: var(--danger);
    cursor: default;
}
input:not([type]), input[type="text"], input[type="email"], input[type="number"], input[type="search"], input[type="date"], input[type="time"], input[type="month"], input[type="datetime-local"], textarea, select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 11px 12px;
    font: inherit;
    background: #fff;
    color: var(--text);
}
input[type="date"],
input[type="time"],
input[type="month"],
input[type="datetime-local"] {
    display: block;
    -webkit-appearance: none;
    appearance: none;
    min-height: 46px;
    line-height: 1.2;
}
textarea { min-height: 110px; resize: vertical; }
[hidden] { display: none !important; }
.checks { display: grid; gap: 8px; margin-top: 8px; }
.checks label { margin: 0; font-weight: 500; display: flex; gap: 8px; align-items: center; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 10px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.notification-settings-form {
    margin-top: 18px;
}
.notification-settings-form > input[data-notification-email] {
    margin-bottom: 22px;
}
.notification-settings-form > h3 {
    margin-top: 26px;
    margin-bottom: 12px;
}
.notification-settings-form .checks {
    gap: 12px;
    margin: 0 0 24px;
}
.notification-settings-form .actions {
    margin-top: 30px;
}
.notification-settings-form .muted {
    cursor: not-allowed;
    opacity: .72;
}
.notification-settings-form .muted input {
    cursor: not-allowed;
}
.web-push-panel {
    margin: 12px 0 18px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fbfcfe;
}
.web-push-status-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}
.web-push-status-row .badge {
    white-space: nowrap;
}
.web-push-status-row .small {
    flex: 1 1 240px;
    min-width: 0;
}
.web-push-panel .actions {
    margin-top: 12px;
}
.web-push-panel [data-web-push-feedback] {
    margin: 10px 0 0;
}
@media (max-width: 640px) {
    .web-push-panel {
        padding: 12px;
    }
    .web-push-status-row {
        align-items: flex-start;
    }
    .web-push-status-row .small {
        flex-basis: 100%;
    }
}
.web-push-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin: 14px 0;
}
.web-push-admin-grid div {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fbfcfe;
}
.web-push-admin-grid span,
.web-push-admin-grid strong {
    display: block;
}
.web-push-admin-grid span {
    color: var(--muted);
    font-size: .86rem;
}
.web-push-admin-grid strong {
    margin-top: 4px;
}
.required-button-wrap {
    display: inline-flex;
}
.required-button-hint {
    color: var(--danger);
}
.field-error {
    margin-top: 6px;
    color: var(--danger);
    font-size: .92rem;
    font-weight: 650;
}
.action-hint {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    line-height: 1.2;
    color: var(--muted);
}
.action-note { margin-top: 12px; }

button, .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    padding: 10px 13px;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
    text-decoration: none;
}
.button-with-icon,
.summary-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.button-icon,
.subscription-bell-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.task-reminder-badge.is-button {
    padding: 0;
    border-color: #f2c94c;
    background: #fff6c9;
    color: #8a5a00;
}
.task-reminder-badge.is-empty {
    border-color: #d7dde6;
    background: #f8fafc;
    color: #667085;
}
button:hover, .button:hover { background: var(--primary-dark); text-decoration: none; }
.task-reminder-badge.is-button:hover,
.task-reminder-badge.is-button:focus-visible {
    background: #ffed9e;
    color: #734600;
}
.task-reminder-badge.is-empty:hover,
.task-reminder-badge.is-empty:focus-visible {
    background: #eef2f7;
    color: #344054;
}
button:focus-visible,
.button:focus-visible,
.back-to-top:focus-visible,
.nav a:focus-visible,
.nav-admin summary:focus-visible,
.nav-mobile-section summary:focus-visible,
.nav-mobile a:focus-visible {
    outline: 3px solid rgba(176, 0, 32, .22);
    outline-offset: 2px;
}
.button.secondary, button.secondary {
    background: #eef1f5;
    color: var(--text);
    border-color: transparent;
}
.button.secondary:hover, button.secondary:hover { background: #e3e7ee; }
.button.ghost, button.ghost {
    background: #f6f7f9;
    color: var(--text);
    border-color: transparent;
    box-shadow: none;
}
.button.ghost:hover, button.ghost:hover {
    background: #eceff3;
}
.back-to-top {
    position: fixed;
    right: calc(20px + env(safe-area-inset-right));
    bottom: calc(20px + env(safe-area-inset-bottom));
    z-index: 900;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    color: var(--primary);
    border-color: var(--border);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .16);
}
.back-to-top:hover {
    background: #fff;
}
.back-to-top svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.button.outline, button.outline {
    background: #fff;
    color: var(--primary);
    border-color: var(--primary);
}
.button.outline:hover, button.outline:hover {
    background: #fff5f4;
    color: var(--primary-dark);
    border-color: var(--primary-dark);
}
.button.proposal, button.proposal,
.button.warning, button.warning {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
}
.button.proposal:hover, button.proposal:hover,
.button.warning:hover, button.warning:hover { background: #ffedd5; }
.topbar .nav a.nav-current,
.topbar .nav-admin summary.nav-current,
.topbar .nav-mobile-section summary.nav-current,
.topbar .nav-mobile a.nav-current,
.topbar .mobile-quick-start.nav-current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.topbar .nav a.nav-current:hover,
.topbar .nav-admin summary.nav-current:hover,
.topbar .nav-mobile-section summary.nav-current:hover,
.topbar .nav-mobile a.nav-current:hover,
.topbar .mobile-quick-start.nav-current:hover {
    background: var(--primary-dark);
}
.topbar .nav-admin.nav-more[open] > summary {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}
.topbar .nav-admin.nav-more[open] > summary:hover {
    background: var(--primary-dark);
}
.topbar .nav a.nav-emphasis:not(.nav-current),
.topbar .mobile-quick-start.nav-emphasis:not(.nav-current) {
    border: 1px solid var(--primary);
    color: var(--primary);
    background: #fff;
}
.topbar .nav a.nav-emphasis:not(.nav-current):hover,
.topbar .mobile-quick-start.nav-emphasis:not(.nav-current):hover {
    background: #fff5f4;
}
.starter-cta {
    padding: 22px;
}
.starter-cta .button {
    min-height: 52px;
    padding-inline: 18px;
    font-size: 1.05rem;
}
.demo-mode form {
    opacity: .72;
}
.button.is-current {
    background: var(--text);
    color: #fff;
    cursor: default;
}
.button.danger, button.danger {
    background: #fff7ed;
    color: #9a3412;
    border-color: #fdba74;
}
.button.danger:hover, button.danger:hover {
    background: #ffedd5;
    color: #7c2d12;
    border-color: #fb923c;
}
button:disabled,
button:disabled:hover,
button[disabled],
button[disabled]:hover,
.button.disabled,
.button[aria-disabled="true"] {
    background: #eef1f5;
    color: var(--muted);
    border-color: #eef1f5;
    opacity: .78;
    cursor: not-allowed;
    box-shadow: none;
    text-decoration: none;
}
.app-tooltip[data-tooltip],
.disabled-tooltip[data-tooltip] {
    position: relative;
    display: inline-flex;
}
.app-tooltip[data-tooltip]:focus-visible,
.disabled-tooltip[data-tooltip]:focus-visible {
    outline: 3px solid rgba(176, 0, 32, .22);
    outline-offset: 2px;
    border-radius: 12px;
}
.app-tooltip[data-tooltip]::after,
.disabled-tooltip[data-tooltip]::after {
    display: none;
    content: none;
}
.app-tooltip[data-tooltip]:hover::after,
.app-tooltip[data-tooltip]:focus::after,
.app-tooltip[data-tooltip]:focus-within::after,
.app-tooltip[data-tooltip].is-active::after,
.disabled-tooltip[data-tooltip]:hover::after,
.disabled-tooltip[data-tooltip]:focus::after,
.disabled-tooltip[data-tooltip]:focus-within::after,
.disabled-tooltip[data-tooltip].is-active::after {
    opacity: 1;
}
.app-floating-tooltip {
    position: fixed;
    z-index: 120;
    box-sizing: border-box;
    width: max-content;
    max-width: min(390px, calc(100vw - 24px)) !important;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    padding: 8px 10px;
    border-radius: 8px;
    background: #111827;
    color: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .22);
    font-size: .86rem;
    font-weight: 650;
    line-height: 1.35;
    text-align: left;
    white-space: pre-line;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
    overflow-y: auto;
    pointer-events: none;
}
.app-floating-tooltip[hidden] {
    display: none;
}
.mobile-rich-popover[hidden] {
    display: none;
}
.mobile-rich-popover {
    position: fixed;
    inset: 0;
    z-index: 140;
    pointer-events: none;
}
.mobile-rich-popover-card {
    position: fixed;
    box-sizing: border-box;
    width: min(360px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    padding: 12px 14px;
    border: 1px solid #111827;
    border-radius: 14px;
    background: #111827;
    color: #fff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .28);
    font-size: .9rem;
    font-weight: 500;
    line-height: 1.4;
    overflow-y: auto;
    overflow-wrap: anywhere;
    pointer-events: auto;
}
body.is-touch-input .help-tip:focus:not(.is-active),
body.is-touch-input .help-tip:focus-within:not(.is-active),
body.is-touch-input .help-tip:hover:not(.is-active) {
    background: #eef1f5;
    outline: 0;
}
body.is-touch-input .help-tip.is-active {
    background: #e3e7ee;
    outline: 2px solid rgba(176, 0, 32, .16);
}
.button.small, button.small { padding: 7px 10px; font-size: .88rem; border-radius: 10px; }
.list-expand-button {
    margin-top: 10px;
}
.inline-form { display: inline; }
.filter-form { margin: 0; }
.filter-panel summary {
    display: flex;
    width: 100%;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.filter-summary-chips {
    display: inline-flex;
    flex: 1 1 320px;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.filter-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    border: 1px solid #d0d5dd;
    border-radius: 999px;
    padding: 3px 8px;
    background: #f8fafc;
    color: #475467;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.filter-chip-reset {
    display: none;
    color: var(--primary);
    background: var(--soft);
    border-color: #f1b8c1;
    text-decoration: none;
}
.filter-chip-reset:hover {
    background: #ffe8ed;
    text-decoration: none;
}
.filter-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    position: relative;
}
.filter-icon::before {
    content: "";
    position: absolute;
    inset: 1px 0 auto;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 9px solid currentColor;
}
.filter-icon::after {
    content: "";
    position: absolute;
    width: 4px;
    height: 7px;
    left: 6px;
    top: 8px;
    background: currentColor;
}
.filter-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
}
.filter-quick-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 8px 0 12px;
}
@media (max-width: 640px) {
    .filter-panel summary {
        align-items: flex-start;
    }
    .filter-summary-chips {
        flex-basis: 100%;
    }
    .filter-chip-reset {
        display: inline-flex;
    }
    .filter-panel[open] .filter-chip-reset {
        display: none;
    }
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-size: .84rem; }
.knowledge-media-usage-card {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    scroll-margin-top: 96px;
}
.knowledge-media-usage-card h3 {
    margin-top: 0;
}
.knowledge-media-usage-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
    gap: 10px;
    margin: 14px 0;
}
.knowledge-media-usage-summary div {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
}
.knowledge-media-usage-summary span {
    display: block;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
}
.knowledge-media-usage-summary strong {
    display: block;
    margin-top: 4px;
    color: var(--text);
    overflow-wrap: anywhere;
}
.knowledge-media-usage-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px 16px;
}
.knowledge-media-storage-warning {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}
.knowledge-media-storage-warning-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.knowledge-media-storage-warning-head h4 {
    margin: 0 0 4px;
}
.knowledge-media-storage-warning-status {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.knowledge-media-storage-warning-status div {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
}
.knowledge-media-storage-warning-status span {
    display: block;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
}
.knowledge-media-storage-warning-status strong {
    display: block;
    margin-top: 4px;
    overflow-wrap: anywhere;
}
.knowledge-media-storage-warning-progress {
    height: 9px;
    margin-top: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #e4e9f2;
}
.knowledge-media-storage-warning-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
}
.knowledge-media-storage-warning-form {
    margin-top: 12px;
}
.knowledge-media-storage-warning-fields {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(120px, .35fr);
    gap: 12px;
}
.knowledge-media-usage-details {
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}
.knowledge-media-usage-details summary {
    padding: 12px 14px;
    cursor: pointer;
    font-weight: 800;
}
.knowledge-media-usage-filter {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(180px, 1.3fr) minmax(150px, 1fr) auto;
    gap: 12px;
    align-items: end;
    padding: 0 14px 14px;
}
.knowledge-media-usage-count {
    margin: 0;
    padding: 0 14px 12px;
}
.knowledge-media-usage-results {
    display: grid;
    gap: 10px;
    padding: 0 14px 14px;
}
.knowledge-media-usage-item {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(170px, .55fr) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
}
.knowledge-media-usage-file,
.knowledge-media-usage-state,
.knowledge-media-usage-usage {
    min-width: 0;
}
.knowledge-media-usage-title {
    color: var(--text);
    font-weight: 800;
    overflow-wrap: anywhere;
}
.knowledge-media-usage-filename {
    margin-top: 3px;
    color: var(--muted);
    font-size: .88rem;
    overflow-wrap: anywhere;
}
.knowledge-media-usage-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-top: 8px;
    color: var(--muted);
    font-size: .82rem;
}
.knowledge-media-usage-meta span {
    min-width: 0;
    overflow-wrap: anywhere;
}
.knowledge-media-usage-state {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}
.knowledge-media-usage-section-label {
    margin-bottom: 4px;
    color: var(--muted);
    font-weight: 800;
}
.knowledge-media-usage-list {
    margin: 0;
    padding-left: 18px;
    overflow-wrap: anywhere;
}
.knowledge-media-usage-list li + li {
    margin-top: 3px;
}
.knowledge-media-usage-pagination {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 12px 14px 14px;
}
@media (max-width: 760px) {
    .knowledge-media-usage-filter {
        grid-template-columns: 1fr;
    }
    .knowledge-media-storage-warning-head {
        display: grid;
    }
    .knowledge-media-storage-warning-fields {
        grid-template-columns: 1fr;
    }
    .knowledge-media-usage-item {
        grid-template-columns: 1fr;
    }
    .knowledge-media-usage-pagination {
        justify-content: flex-start;
    }
}
.backup-tabs {
    display: flex;
    gap: 8px;
    margin: 0 0 16px;
    padding: 4px 0 6px;
    overflow-x: auto;
}
.backup-tab {
    flex: 0 0 auto;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 9px 13px;
    background: #fff;
    color: var(--text);
    font-weight: 800;
    font-size: .92rem;
}
.backup-tab:hover {
    background: #f8fafc;
    text-decoration: none;
}
.backup-tab.is-active {
    border-color: #f1b8c1;
    background: var(--soft);
    color: var(--primary-dark);
}
.backup-loading-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 14px;
    border: 1px solid #b8c7e6;
    border-radius: 12px;
    background: var(--info-bg);
    color: var(--text);
}
.backup-loading-box[hidden] {
    display: none !important;
}
.backup-loading-box p {
    margin: 2px 0 0;
}
.backup-spinner {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border: 3px solid rgba(53, 56, 205, .18);
    border-top-color: var(--info);
    border-radius: 999px;
    animation: backup-spin .85s linear infinite;
}
.checksum-code {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}
@keyframes backup-spin {
    to { transform: rotate(360deg); }
}
.form-grid {
    display: grid;
    gap: 12px;
}
.user-admin-head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.user-admin-head h1 {
    margin-bottom: 4px;
}
.user-filter-bar {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}
.user-filter-bar label {
    margin-top: 0;
}
.user-table {
    min-width: 860px;
}
.user-table th {
    text-transform: uppercase;
    letter-spacing: 0;
}
.clickable-row {
    cursor: pointer;
}
.clickable-row:hover {
    background: #fbfcfe;
}
.clickable-row:focus-visible {
    outline: 3px solid rgba(176, 0, 32, .2);
    outline-offset: -3px;
}
.table-main-link {
    color: var(--text);
    font-weight: 800;
}
.user-name-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    flex-wrap: wrap;
}
.row-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
}
.row-badges-tight {
    margin-top: 0;
}
.user-detail-card {
    max-width: 1040px;
}
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.role-checks {
    columns: 1;
}
.permission-editor {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.permission-editor h2 {
    margin-bottom: 4px;
}
.permission-group {
    margin-top: 16px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fbfcfe;
}
.permission-group h3 {
    margin-top: 0;
}
.permission-checks {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    align-items: start;
}
.permission-checks label {
    align-items: flex-start;
    padding: 8px;
    border-radius: 10px;
    background: #fff;
}
.permission-checks small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-weight: 500;
    line-height: 1.35;
}
.permission-checks .permission-key {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .78rem;
    font-weight: 500;
}
.process-template-visibility {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.process-template-visibility h4 {
    margin: 0 0 4px;
}
.process-template-visibility.is-muted .process-template-checks {
    opacity: .62;
}
.process-template-checks small {
    color: var(--muted);
}
.role-cleanup-report {
    font-size: .92rem;
}
.role-cleanup-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.notice {
    border: 1px solid #ffd6a8;
    background: #fff7ed;
    color: #7a3b00;
    border-radius: 14px;
    padding: 12px;
}
.maintenance-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid #f59e0b;
    background: #fffbeb;
    color: #78350f;
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 16px;
}
.maintenance-banner form {
    margin: 0;
}
.dashboard-announcement {
    position: relative;
    overflow: visible;
    border-color: #bfd4ff;
    background: linear-gradient(135deg, #f7faff, #eef4ff);
}
.dashboard-announcement::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: #4f7cff;
}
.dashboard-announcement.is-empty {
    border-style: dashed;
}
.announcement-copy {
    padding-right: 46px;
}
.announcement-copy h2 {
    margin-bottom: 4px;
}
.announcement-copy p {
    margin-bottom: 0;
}
.announcement-red {
    color: var(--primary);
}
.announcement-edit {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
}
.announcement-edit:hover {
    background: #eef4ff;
}
.announcement-editor {
    margin-top: 14px;
}
.remember-login-card {
    border-color: #c7d7fe;
    background: #f8fbff;
}
.login-card {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}
.login-card h1 {
    margin-bottom: 8px;
}
.login-primary-actions {
    justify-content: center;
    margin: 22px 0 16px;
}
.login-primary-actions .button {
    min-width: min(100%, 260px);
    justify-content: center;
    padding: 12px 18px;
    font-size: 1rem;
}
.login-secondary-note {
    padding-top: 14px;
    margin-bottom: 0;
    text-align: center;
    border-top: 1px solid var(--border);
}
.magic-link-request-panel {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.magic-link-request-panel--collapsible {
    padding-top: 14px;
}
.magic-link-request-panel--collapsible summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--muted);
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}
.magic-link-request-panel--collapsible summary::-webkit-details-marker {
    display: none;
}
.magic-link-request-panel--collapsible summary::after {
    content: "+";
    font-size: .95rem;
    line-height: 1;
}
.magic-link-request-panel--collapsible[open] summary::after {
    content: "-";
}
.magic-link-request-panel--collapsible summary:hover,
.magic-link-request-panel--collapsible summary:focus-visible {
    color: var(--brand);
}
.magic-link-request-panel-body {
    padding-top: 14px;
}
.magic-link-request-panel h2 {
    margin-bottom: 6px;
    font-size: 1.05rem;
}
.magic-link-request-form {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}
.magic-link-request-help {
    min-height: 1.25em;
    margin: -2px 0 0;
    color: var(--muted);
}
.magic-link-request-help.is-ready {
    color: #166534;
}
.magic-link-request-form .actions {
    justify-content: center;
}
.magic-link-request-form button {
    min-width: min(100%, 220px);
    justify-content: center;
}
.magic-link-request-form button:disabled {
    opacity: .55;
    cursor: not-allowed;
    filter: grayscale(.2);
}
.dashboard-email-notice {
    position: relative;
    border-color: #fed7aa;
    background: #fff7ed;
}
.dashboard-email-notice h2 {
    padding-right: 34px;
}
.dashboard-email-notice p {
    max-width: none;
    padding-right: 42px;
}
.legal-section h3 {
    margin-top: 16px;
}
.legal-section code {
    font-size: .92em;
}
.codebox {
    width: 100%;
    min-height: 80px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .86rem;
}

.timeline { display: grid; gap: 12px; }
.timeline-entry { padding-left: 0; }
.timeline-entry strong { display: block; }
.comment-list-card {
    scroll-margin-top: 18px;
    min-width: 0;
}
.comment-list-card-collapsible {
    overflow: visible;
}
.comment-list-card.is-loading {
    opacity: .72;
}
.comment-list-summary h2 {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    line-height: 1.18;
}
.comment-list-body {
    display: grid;
    gap: 12px;
}
.comment-list-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
    min-width: 0;
}
.comment-list-heading-controls {
    margin-bottom: 0;
}
.comment-list-heading h2 {
    margin-bottom: 0;
    min-width: 0;
    overflow-wrap: break-word;
}
.comment-list-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px 12px;
    min-width: 0;
}
.comment-list-title-row h2 {
    min-width: 0;
}
.comment-list-title-main h2 {
    display: inline;
    line-height: 1.18;
}
.comment-list-title-text {
    overflow-wrap: anywhere;
}
.comment-list-title-main {
    display: flex;
    flex: 1 1 260px;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.comment-list-action-row {
    justify-content: flex-end;
}
.comment-title-help.help-tip.mini {
    margin-left: 6px;
    vertical-align: text-bottom;
}
.comment-add-button {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 6px 10px;
    white-space: nowrap;
}
.comment-list-controls {
    display: inline-flex;
    flex: 0 0 auto;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #f6f7f9;
}
.comment-list-control-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-self: end;
    max-width: 100%;
    min-width: 0;
}
.comment-list-control-wrap .comment-list-controls {
    flex: 1 1 auto;
    min-width: 0;
}
.comment-filter-help.help-tip.mini {
    margin-left: 0;
}
.comment-filter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 750;
    line-height: 1.1;
    text-decoration: none;
    white-space: nowrap;
}
.comment-filter-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.comment-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 17px;
    height: 17px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e7ebf0;
    color: #667085;
    font-size: .72rem;
    font-weight: 800;
    line-height: 1;
}
.comment-filter-pill.is-active .comment-filter-count {
    background: rgba(255, 255, 255, .22);
    color: #fff;
    opacity: .86;
}
.comment-filter-pill:hover {
    background: #eceff3;
    color: var(--text);
    text-decoration: none;
}
.comment-filter-pill.is-active {
    color: #fff;
    background: var(--primary);
}
.comment-list-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
}
.comment-list-more-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}
.comment-list-show-all {
    gap: 5px;
}
.comment-list-show-all .button-icon {
    width: 14px;
    height: 14px;
}
.comment-entry {
    position: relative;
    max-width: 100%;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.comment-entry-automatic {
    color: var(--muted);
    background: #fafbfc;
    border-color: #e5e9f0;
}
.comment-severity-warning {
    color: var(--text);
    background: #fffcf2;
    border-color: #f3d28c;
}
.comment-severity-error {
    color: var(--text);
    background: #fff7f7;
    border-color: #f5b5b5;
}
.comment-severity-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    margin: 0 0 0 8px;
    color: var(--danger);
    background: var(--danger-bg);
    border: 1px solid #fecdca;
    font-size: .76rem;
    font-weight: 800;
    line-height: 1;
}
.comment-severity-badge.warning {
    color: #92400e;
    background: #fef3c7;
    border-color: #fde68a;
}
.comment-severity-badge.resolved {
    color: var(--ok);
    background: var(--ok-bg);
    border-color: #abefc6;
}
.comment-severity-resolved {
    background: #f7fbf8;
    border-color: #abefc6;
}
.comment-resolved-note {
    margin-top: 6px;
    color: var(--muted);
    font-size: .84rem;
}
.comment-entry-user {
    color: var(--text);
    background: #fbfdff;
    border-color: #d8e3f5;
}
.comment-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
    min-width: 0;
}
.comment-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.comment-meta-line strong {
    display: inline;
}
.comment-trigger {
    color: var(--muted);
    font-size: .78rem;
    margin-top: 2px;
}
.comment-automatic-text + .comment-embedded-user-text {
    margin-top: 8px;
}
.comment-automatic-text,
.comment-embedded-user-body,
.comment-resolved-note {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.comment-embedded-user-text {
    display: grid;
    gap: 3px;
    max-width: 100%;
    min-width: 0;
    padding: 9px 11px;
    border: 1px solid #dce6f3;
    border-radius: 8px;
    background: #f7faff;
    color: var(--text);
    overflow-wrap: anywhere;
    word-break: break-word;
}
.comment-embedded-user-label {
    color: #4b668f;
    font-size: .76rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0;
}
.comment-embedded-user-body {
    color: var(--text);
}
.comment-edit-details {
    position: relative;
    flex: 0 0 auto;
}
.comment-edit-details summary {
    list-style: none;
}
.comment-edit-details summary::-webkit-details-marker {
    display: none;
}
.comment-edit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    cursor: pointer;
}
.comment-edit-button:hover {
    color: var(--text);
    border-color: #c7cfdb;
    text-decoration: none;
}
.comment-edited-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.comment-edited-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    color: var(--text);
    border: 1px solid transparent;
    border-radius: 999px;
    background: #eef1f5;
    cursor: pointer;
    flex: 0 0 auto;
}
.comment-edited-indicator svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.comment-edited-indicator:hover,
.comment-edited-indicator:focus {
    color: var(--text);
    border-color: #d0d5dd;
    background: #e3e7ee;
    outline: none;
}
.comment-edited-indicator:focus-visible {
    box-shadow: 0 0 0 3px rgba(102, 112, 133, .16);
}
.comment-edited-popover {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    z-index: 30;
    width: max-content;
    max-width: min(280px, 70vw);
    padding: 7px 9px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #172033;
    color: #fff;
    box-shadow: var(--shadow);
    font-size: .78rem;
    font-weight: 500;
    line-height: 1.35;
    text-align: left;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%);
}
.comment-edited-popover::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -5px;
    width: 9px;
    height: 9px;
    background: #172033;
    transform: translateX(-50%) rotate(45deg);
}
.comment-edited-wrap:hover .comment-edited-popover,
.comment-edited-wrap:focus-within .comment-edited-popover,
.comment-edited-wrap.is-open .comment-edited-popover {
    opacity: 1;
    visibility: visible;
}
.comment-edit-form {
    position: absolute;
    right: 0;
    z-index: 20;
    width: min(420px, calc(100vw - 48px));
    margin-top: 6px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow);
}
.comment-edit-form textarea {
    min-height: 110px;
}

@media (max-width: 520px) {
    .comment-list-title-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
    }
    .comment-list-title-row h2 {
        flex-basis: auto;
    }
    .comment-list-title-main {
        min-width: 0;
    }
    .comment-add-button {
        justify-self: end;
    }
    .comment-list-controls {
        width: 100%;
        overflow-x: auto;
    }
    .comment-list-control-wrap {
        justify-self: stretch;
        width: 100%;
    }
    .comment-list-control-wrap .comment-list-controls {
        width: auto;
        min-width: 0;
    }
    .comment-filter-pill {
        flex: 1 1 0;
        min-width: 0;
        padding-inline: 7px;
        font-size: .76rem;
        gap: 4px;
    }
    .comment-filter-count {
        min-width: 16px;
        height: 16px;
        padding-inline: 4px;
        font-size: .68rem;
    }
    .comment-list-footer {
        display: grid;
    }
    .comment-heading {
        display: grid;
        justify-content: stretch;
    }
    .comment-edit-details {
        justify-self: start;
    }
    .comment-edited-popover {
        left: 0;
        bottom: auto;
        top: calc(100% + 8px);
        max-width: calc(100vw - 48px);
        transform: none;
    }
    .comment-edited-popover::after {
        top: -5px;
        bottom: auto;
        left: 12px;
        transform: rotate(45deg);
    }
    .comment-edit-form {
        position: static;
        width: 100%;
        margin-top: 8px;
    }
}

@media (max-width: 380px) {
    .comment-list-title-row {
        grid-template-columns: 1fr;
    }
    .comment-add-button {
        justify-self: start;
    }
}

.control-panel summary {
    cursor: pointer;
    font-weight: 800;
    font-size: 1.05rem;
}
.control-panel summary::marker { color: var(--muted); }
.control-panel[open] summary { margin-bottom: 10px; }
.access-panel {
    font-size: .9rem;
    opacity: .92;
}
.maintenance-card {
    max-width: 760px;
    margin: 12vh auto 0;
    text-align: center;
}
.maintenance-card h1 {
    margin-bottom: 10px;
}
.page-actions { margin: 0 0 14px; }
.task-edit-heading {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    margin-bottom: 12px;
}
.task-edit-heading h2 {
    margin-bottom: 0;
}
.task-edit-help.help-tip.mini {
    margin-left: 0;
}
.task-secondary-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
}
.task-action-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
    margin-top: 14px;
}
.primary-task-action {
    display: inline-flex;
    align-items: center;
    margin-top: 0;
}
.primary-task-action p {
    margin: 0;
}
.primary-task-action .button-with-icon {
    min-height: 44px;
}
.claim-task-action {
    min-height: 44px;
}
.claim-task-form {
    margin: 0;
}
.claim-task-form .claim-task-button,
.claim-task-disabled {
    min-height: 44px;
}
.completion-action-panel {
    margin-top: 12px;
}
.check-line {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 100%;
    line-height: 1.35;
}
.check-line input[type="checkbox"],
.check-line input[type="radio"] {
    flex: 0 0 auto;
    margin-top: 2px;
}
.completion-next-hint {
    max-width: 760px;
    margin: 0 0 10px;
}
.completion-options-box {
    display: grid;
    gap: 10px;
    margin: 14px 0;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
}
.completion-options-box h4 {
    margin: 0;
    font-size: .98rem;
}
.completion-option-choice {
    display: grid;
    gap: 5px;
    padding: 8px 0;
    border-top: 1px solid rgba(221, 227, 236, .8);
}
.completion-option-date {
    max-width: 260px;
    padding-left: 24px;
}
.completion-option-date.is-disabled {
    opacity: .65;
}
.completion-option-date.is-disabled input {
    background: #f1f5f9;
}
.completion-options-admin {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}
.completion-option-admin-row {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
}
.completion-option-admin-row.is-removed {
    border-style: dashed;
    background: #f8fafc;
    opacity: .78;
}
.completion-option-admin-row.is-removed .completion-option-field,
.completion-option-admin-row.is-removed .completion-option-admin-grid,
.completion-option-admin-row.is-removed .completion-option-active-toggle,
.completion-option-admin-row.is-removed .completion-option-comment-required,
.completion-option-admin-row.is-removed .completion-option-backward-jump {
    opacity: .58;
}
.completion-option-admin-head {
    display: grid;
    grid-template-columns: minmax(76px, 110px) minmax(260px, 1fr) auto;
    gap: 12px;
    align-items: end;
}
.completion-option-admin-grid {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(280px, 1.25fr);
    gap: 12px;
    margin-top: 12px;
    align-items: start;
}
.completion-option-field {
    min-width: 0;
}
.completion-option-active-toggle {
    align-self: center;
    margin-bottom: 4px;
    white-space: nowrap;
}
.completion-option-active-toggle,
.completion-option-comment-required,
.completion-option-backward-jump {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
    line-height: 1.25;
}
.completion-option-active-toggle input,
.completion-option-comment-required input,
.completion-option-backward-jump input {
    width: auto;
    min-width: 16px;
    margin: 0;
}
.completion-options-admin input,
.completion-options-admin select,
.completion-options-admin textarea {
    width: 100%;
    min-width: 0;
}
.completion-options-admin textarea {
    margin-top: 6px;
}
.completion-options-admin .completion-option-active-toggle input[type="checkbox"],
.completion-options-admin .completion-option-comment-required input[type="checkbox"],
.completion-options-admin .completion-option-backward-jump input[type="checkbox"] {
    width: auto;
}
.completion-option-help-cell {
    margin-top: 10px;
}
.completion-option-comment-required {
    margin-top: 12px;
}
.completion-option-backward-jump {
    margin-top: 12px;
}
.completion-option-backward-warning {
    margin: 8px 0 0;
}
.completion-option-remove-action {
    align-items: center;
    margin-top: 12px;
}
.completion-options-admin.is-disabled {
    opacity: .72;
}
.completion-options-admin.is-disabled .completion-option-admin-row {
    background: #f8fafc;
}
.completion-option-target-note {
    min-height: 42px;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 10px 12px;
    border: 1px dashed var(--border);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--muted);
}
.completion-option-target-note[hidden],
.completion-option-followup[hidden],
.required-mark[hidden] {
    display: none;
}
.completion-option-followup {
    margin: 2px 0 0 24px;
}
@media (max-width: 1180px) {
    .completion-option-admin-head,
    .completion-option-admin-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .completion-option-label-cell {
        grid-column: 1 / -1;
    }
    .completion-option-active-toggle {
        justify-self: start;
    }
}
.action-guide {
    margin-top: 14px;
}
.task-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.inline-action-panel {
    margin-top: 10px;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    background: #fbfcfe;
    scroll-margin-top: 18px;
}
.inline-action-panel h3 {
    margin-bottom: 0;
    font-size: 1rem;
}
.task-reminder-panel .task-reminder-form {
    display: grid;
    gap: 12px;
}
.task-reminder-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.task-reminder-current {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 12px;
    color: var(--muted);
    font-size: .92rem;
}
.task-reminder-remove-form {
    margin-top: 10px;
}
.action-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}
.action-panel-close,
.action-menu-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 750;
    line-height: 1;
    cursor: pointer;
}
.action-panel-close {
    min-height: 30px;
    padding: 6px 10px;
}
.action-panel-close:hover,
.action-panel-close:focus-visible,
.action-menu-close:hover,
.action-menu-close:focus-visible {
    color: var(--text);
    border-color: #cfd6e1;
    background: #f7f8fa;
    text-decoration: none;
}
.task-action-menu-row,
.process-action-menu-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}
.task-action-toolbar .task-action-menu-row {
    margin-top: 0;
}
.action-menu {
    position: relative;
    display: inline-block;
}
.action-menu-summary {
    gap: 8px;
}
.action-menu-caret {
    width: 15px;
    height: 15px;
    margin-left: 2px;
}
.action-menu[open] .action-menu-caret {
    transform: rotate(180deg);
}
.action-menu-popover {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 80;
    width: min(360px, calc(100vw - 32px));
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .15);
}
.action-menu-close {
    width: 100%;
    min-height: 34px;
    margin-bottom: 4px;
    padding: 7px 10px;
}
.action-menu-close-icon {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.action-menu-group {
    display: grid;
    gap: 2px;
    padding: 6px 0;
}
.action-menu-group + .action-menu-group {
    border-top: 1px solid var(--border);
}
.action-menu-group-label {
    padding: 6px 10px 4px;
    color: var(--muted);
    font-size: .74rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}
.action-menu-item {
    display: grid;
    grid-template-columns: 20px 1fr;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 42px;
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    text-align: left;
    font-weight: 700;
    text-decoration: none;
}
.action-menu-item:hover,
.action-menu-item:focus-visible {
    background: #f4f6f8;
    color: var(--text);
    text-decoration: none;
}
.action-menu-item.is-warning {
    color: var(--warning);
}
.action-menu-item.is-danger {
    color: var(--danger);
}
.action-menu-item.is-disabled,
.action-menu-item.is-disabled:hover {
    color: var(--muted);
    background: transparent;
    cursor: default;
    opacity: .74;
}
.action-menu-icon {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.danger-panel {
    border-color: #fecdca;
    background: #fffafa;
}
.action-panel {
    margin: 0;
    min-width: min(100%, 300px);
}
.action-panel summary {
    list-style: none;
}
.action-panel summary::-webkit-details-marker {
    display: none;
}
.action-panel[open] {
    flex: 1 1 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    background: #fbfcfe;
}
.task-release-panel textarea {
    min-height: 90px;
}
.handover-panel form,
.task-handover-panel form {
    margin-top: 10px;
}
.process-handover-action {
    position: relative;
}
.process-handover-action[open] {
    flex: 1 1 100%;
}
.process-handover-action .inline-action-panel {
    width: min(520px, calc(100vw - 40px));
    margin-top: 8px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fbfcfe;
}
.process-handover-action .inline-action-panel form {
    width: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.handover-reason {
    min-height: 90px;
}
.handover-mail-hint {
    margin-top: 6px;
}
.handover-scope-note {
    line-height: 1.45;
}
.handover-warning {
    margin: 10px 0 12px;
}
.handover-warning p {
    margin: 6px 0 0;
}
.task-handover-options {
    display: grid;
    gap: 12px;
}
.task-handover-option-form {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}
.task-handover-option-form h4 {
    margin: 0 0 6px;
    font-size: 1rem;
}
.task-handover-option-form p.small {
    margin-top: 0;
}
.handover-mode-tabs,
.handover-option-tabs {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}
.handover-mode-tabs > input,
.handover-option-tabs > input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.handover-mode-tabs > label,
.handover-option-tabs > label {
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font-weight: 700;
    text-align: center;
    cursor: pointer;
}
.handover-mode-tabs > input:focus-visible + label,
.handover-option-tabs > input:focus-visible + label {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.handover-mode-tabs > input:checked + label,
.handover-option-tabs > input:checked + label {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}
.handover-mode-panels,
.handover-option-panels {
    grid-column: 1 / -1;
    min-width: 0;
}
.handover-mode-panel,
.handover-option-panel {
    display: none;
}
.handover-mode-tabs > input[value="task"]:checked ~ .handover-mode-panels .handover-task-mode-panel,
.handover-mode-tabs > input[value="process"]:checked ~ .handover-mode-panels .handover-process-mode-panel {
    display: block;
}
.handover-option-tabs > input[value="role"]:checked ~ .handover-option-panels .handover-role-option-panel,
.handover-option-tabs > input[value="person"]:checked ~ .handover-option-panels .handover-person-option-panel {
    display: block;
}
@media (max-width: 640px) {
    .handover-mode-tabs,
    .handover-option-tabs {
        grid-template-columns: 1fr;
    }
}
.linked-processes {
  margin-top: 12px;
}

.process-start-values {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}
.process-context-box {
    margin: 14px 0;
    max-width: 100%;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
}
.process-context-box h2 {
    margin-bottom: 14px;
    font-size: 1.05rem;
}
.context-details {
    display: grid;
    gap: 16px 24px;
    margin: 0;
    min-width: 0;
}
.process-context-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.context-detail-item {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}
.context-details dt {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 750;
}
.context-details dd {
    margin: 0;
    color: var(--text);
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.context-detail-icon,
.context-description-icon {
    width: 17px;
    height: 17px;
    margin-top: 2px;
    color: var(--muted);
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.context-detail-note {
    margin-top: 3px;
    color: var(--muted);
    font-size: .82rem;
}
.context-description {
    min-width: 0;
    max-width: 100%;
    margin-top: 12px;
}
.context-task-description,
.context-process-description {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.context-description > div,
.context-start-values-list {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.context-description strong,
.context-start-values > strong {
    display: block;
    margin-bottom: 5px;
}
.context-start-values-list {
    display: grid;
    gap: 4px;
}
.context-start-values p {
    margin: 0;
}
.context-start-values span,
.context-start-values-list span {
    font-weight: 750;
}

.process-start-values p {
  margin: 0;
}
@media (max-width: 720px) {
    .process-context-meta {
        grid-template-columns: 1fr;
    }
}
.linked-processes p:last-child {
    margin-bottom: 0;
}
.title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.title-row h1 { margin-bottom: 12px; }
.title-actions {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    flex: 0 0 auto;
}
.title-edit {
    position: relative;
    flex: 0 0 auto;
}
.title-edit summary {
    list-style: none;
}
.title-edit summary::-webkit-details-marker { display: none; }
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #eef1f5;
    color: var(--text);
    cursor: pointer;
    font-weight: 800;
}
.icon-button:hover { background: #e3e7ee; }
.process-subscription-menu {
    position: relative;
    flex: 0 0 auto;
}
.process-subscription-menu summary {
    list-style: none;
}
.process-subscription-menu summary::-webkit-details-marker {
    display: none;
}
.process-subscription-trigger.is-active {
    color: #9a5b00;
    background: #fff4db;
    border: 1px solid #f7c56a;
}
.process-subscription-trigger.is-active:hover {
    background: #ffedbd;
}
.process-subscription-trigger.is-off {
    color: var(--muted);
}
.process-subscription-trigger.is-warning {
    position: relative;
    color: #6b7280;
    background: #eef1f5;
    border: 1px solid #cfd6df;
}
.process-subscription-trigger.is-warning:hover {
    color: #4b5563;
    background: #e3e7ee;
}
.process-subscription-trigger.has-comment-full {
    position: relative;
}
.bell-star-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.bell-star-badge {
    position: absolute;
    top: -9px;
    right: -10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #f59f00;
    color: #fff;
    font-size: .56rem;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .22);
}
.subscription-section-bell-star {
    color: #9a5b00;
}
.subscription-section-bell-star .bell-star-badge {
    top: -9px;
    right: -10px;
    width: 15px;
    height: 15px;
    font-size: .56rem;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .18);
}
.subscription-warning-badge {
    position: absolute;
    right: -3px;
    top: -4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #c2410c;
    color: #fff;
    font-size: .68rem;
    font-weight: 900;
    line-height: 1;
}
.process-subscription-popover {
    position: absolute;
    right: 0;
    top: 42px;
    z-index: 25;
    width: min(420px, calc(100vw - 44px));
    padding: 14px;
    border: 2px solid #374151;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .22);
}
.process-subscription-popover h3 {
    margin-bottom: 6px;
}
.process-subscription-popover h4 {
    margin: 12px 0 6px 0;
    font-size: .95rem;
}
.subscription-status-info,
.subscription-context-info,
.subscription-role-info,
.subscription-warning-box {
    padding: 10px;
    border-radius: 10px;
}
.subscription-status-info {
    border: 1px solid #d6dee8;
    background: #f7f9fc;
}
.subscription-status-info.is-active {
    border-color: #abefc6;
    background: #f0fdf4;
}
.subscription-status-info.is-neutral {
    border-color: #d6dee8;
    background: #f7f9fc;
}
.subscription-status-info.is-danger {
    border-color: #fecdca;
    background: #fff1f3;
}
.subscription-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eef1f5;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 850;
}
.subscription-status-pill.is-active {
    background: #dcfae6;
    color: #067647;
}
.subscription-status-pill.is-danger {
    background: #fee4e2;
    color: #b42318;
}
.subscription-context-info {
    margin-bottom: 10px;
    border: 1px solid #c7d7fe;
    background: #f8fbff;
}
.subscription-role-info {
    margin: 10px 0;
    border: 1px solid #d6dee8;
    background: #f7f9fc;
}
.subscription-warning-box {
    border: 1px solid #fb9a70;
    background: #fff7ed;
}
.subscription-status-info strong,
.subscription-context-info strong,
.subscription-warning-box strong {
    display: block;
    margin-bottom: 4px;
}
.subscription-status-info p,
.subscription-context-info p,
.subscription-role-info p,
.subscription-warning-box p {
    margin: 0;
    color: var(--muted);
    font-size: .86rem;
    line-height: 1.45;
}
.subscription-warning-box .actions {
    margin-top: 10px;
}
.subscription-action-form {
    display: block;
    margin-top: 12px;
    text-align: center;
}
.subscription-action-button {
    max-width: 100%;
    cursor: pointer;
}
button.subscription-action-primary {
    background: #067647;
    color: #fff;
    border-color: #067647;
}
button.subscription-action-primary:hover,
button.subscription-action-primary:focus {
    background: #05603a;
    border-color: #05603a;
}
button.subscription-action-danger {
    background: var(--soft);
    color: var(--primary-dark);
    border-color: #e9a4b0;
    box-shadow: inset 0 0 0 1px rgba(176, 0, 32, .08);
}
button.subscription-action-danger:hover,
button.subscription-action-danger:focus {
    background: #ffe5ea;
    border-color: #cf6f80;
}
button.subscription-action-soft {
    background: var(--soft);
    color: var(--primary-dark);
    border-color: #f4c7cf;
}
button.subscription-action-soft:hover,
button.subscription-action-soft:focus {
    background: #ffe5ea;
    border-color: #ef9dad;
}
.subscription-comment-full {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fbfcfe;
}
.subscription-section-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.subscription-section-heading h4 {
    margin: 0;
}
.subscription-section-icon {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.subscription-options {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}
.subscription-options label {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: flex-start;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-weight: 500;
    background: #fbfcfe;
}
.subscription-options strong,
.subscription-options small {
    display: block;
}
.subscription-options small {
    margin-top: 2px;
    color: var(--muted);
    font-size: .8rem;
    line-height: 1.35;
}
.task-detail-card {
    position: relative;
    min-width: 0;
    overflow-wrap: anywhere;
}
.comment-notification-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.comment-notification-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-weight: 650;
}
.comment-notification-help {
    cursor: help;
}
.comment-notification-explain {
    margin-left: 0;
}
.comment-notification-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.comment-notification-icon {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.comment-notification-badge {
    position: absolute;
    top: -9px;
    right: -10px;
    box-sizing: border-box;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: .66rem;
    font-weight: 900;
    line-height: 12px;
    text-align: center;
}
.comment-notification-control.is-notification-disabled .comment-notification-help {
    color: var(--muted);
    background: #f1f3f6;
}
.comment-notification-control.is-notification-disabled .comment-notification-icon {
    opacity: .72;
}
.comment-notification-control.is-notification-disabled .comment-notification-badge {
    background: #98a2b3;
    color: #fff;
}
.comment-notification-control.is-notification-vollabo-active .comment-notification-help {
    color: #9a5b00;
    background: #fff4db;
}
.comment-notification-control.is-notification-vollabo-active .comment-notification-badge {
    background: #f59f00;
    color: #fff;
}
.comment-email-state.help-tip.mini {
    width: 22px;
    height: 22px;
    margin-left: 0;
    color: var(--muted);
    background: #f1f3f6;
    border: 1px solid #d6dee8;
}
.comment-email-state.help-tip.mini.is-requested {
    border-color: #cbd6e2;
    background: #f6f8fb;
    color: #667085;
}
.comment-email-state.help-tip.mini.is-not-requested {
    border-color: #d6dee8;
    background: #f1f3f6;
    color: var(--muted);
}
.comment-email-state.help-tip.mini.is-unknown {
    border-color: #dde3ea;
    background: #f7f8fa;
    color: #98a2b3;
}
.comment-email-state-icon {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}
.task-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}
.task-detail-head .task-number {
    margin: 0;
    min-width: 0;
}
.task-head-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 0 auto;
}
.task-detail-title {
    margin-right: 0;
}
.title-edit form {
    position: absolute;
    right: 0;
    top: 42px;
    z-index: 20;
    width: min(520px, calc(100vw - 44px));
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow);
}
@media (max-width: 520px) {
    .title-row {
        display: grid;
    }
    .title-actions {
        justify-self: start;
    }
    .process-subscription-popover,
    .title-edit form {
        left: 0;
        right: auto;
        width: min(420px, calc(100vw - 44px));
    }
    .task-head-actions .process-subscription-popover {
        left: auto;
        right: 0;
    }
    .subscription-action-form button {
        width: 100%;
    }
    .dashboard-email-notice p {
        padding-right: 0;
    }
}

@media (min-width: 760px) {
    .topbar { flex-direction: row; align-items: center; justify-content: space-between; }
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
    .movement-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .movement-row {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }
    .form-row.two { grid-template-columns: 1fr 1fr; }
    .form-row.three { grid-template-columns: 1fr 1fr 1fr; }
    .filter-grid { grid-template-columns: minmax(280px, 1.35fr) repeat(3, minmax(180px, 1fr)); }
}

@media (min-width: 1240px) {
    .testsystem-edge-marker {
        position: fixed;
        top: 76px;
        bottom: 16px;
        z-index: 8;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        overflow: hidden;
        pointer-events: none;
        color: var(--primary-dark);
        background: linear-gradient(180deg, rgba(255, 247, 248, .92), rgba(255, 241, 240, .78));
        border: 1px solid rgba(180, 35, 24, .18);
        box-shadow: 0 12px 28px rgba(16, 24, 40, .08);
        font-size: .72rem;
        font-weight: 800;
        letter-spacing: 0;
        line-height: 1;
        text-transform: uppercase;
    }
    .testsystem-edge-marker-left {
        left: max(16px, calc((100vw - var(--content-max-width)) / 2 - 42px));
        border-radius: 8px;
    }
    .testsystem-edge-marker-right {
        right: max(16px, calc((100vw - var(--content-max-width)) / 2 - 42px));
        border-radius: 8px;
    }
    .testsystem-edge-marker span {
        display: block;
        white-space: nowrap;
        transform: rotate(-90deg);
    }
    .testsystem-edge-marker-right span {
        transform: rotate(90deg);
    }
}

.assignment-box {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fbfcfe;
}
.assignment-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 8px;
}
.assignment-head h2 { margin-bottom: 4px; }
.assignment-fields { align-items: start; }
.field-hint {
    color: var(--muted);
    font-size: .82rem;
    margin: 6px 0 0;
}
.is-muted { opacity: .55; }
.help-tip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #eef1f5;
    color: var(--text);
    font-weight: 800;
    font-size: .86rem;
    cursor: help;
    vertical-align: middle;
    flex: 0 0 auto;
}
.help-tip.mini {
    width: 18px;
    height: 18px;
    font-size: .72rem;
    margin-left: 4px;
}
.help-tip:hover, .help-tip:focus {
    background: #e3e7ee;
    outline: 2px solid rgba(176, 0, 32, .16);
}
.help-popover {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 30;
    box-sizing: border-box;
    width: min(380px, calc(100vw - 36px));
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    padding: 10px 12px;
    border: 1px solid #111827;
    border-radius: 12px;
    background: #111827;
    color: #fff;
    box-shadow: var(--shadow);
    font-weight: 500;
    font-size: .88rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
    overflow-y: auto;
    hyphens: auto;
}
.help-popover-title {
    display: block;
    margin-bottom: 6px;
    font-weight: 850;
}
.help-popover p {
    margin: 0;
}
.help-popover p + p {
    margin-top: 8px;
}
.help-popover-note {
    color: #d1d5db;
    font-size: .82rem;
}
.help-popover-list {
    margin: 6px 0 0;
    padding-left: 18px;
}
.help-popover-list li + li {
    margin-top: 3px;
}
.help-tip:focus .help-popover, .help-tip:focus-within .help-popover, .help-tip.is-active .help-popover {
    display: block;
}
body.is-touch-input .help-tip:focus .help-popover,
body.is-touch-input .help-tip:focus-within .help-popover,
body.is-touch-input .help-tip.is-active .help-popover {
    display: none;
}
@media (hover: hover) and (pointer: fine) {
    .help-tip:hover .help-popover {
        display: block;
    }
}
.help-hero p {
    max-width: 760px;
}
.help-hero,
#grundidee,
#grundbegriffe,
#aufgaben,
#dashboard-hilfe,
#beispiel {
    scroll-margin-top: 104px;
}
.help-jumps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.help-jumps a {
    color: var(--text);
    background: #eef1f5;
    border-radius: 999px;
    padding: 8px 11px;
    font-size: .9rem;
}
.help-jumps a:hover {
    background: #e3e7ee;
    text-decoration: none;
}
.help-flow,
.help-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
}
.help-flow div,
.help-term {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    background: #fbfcfe;
}
.help-flow strong {
    display: block;
    margin-bottom: 4px;
}
.help-flow span {
    color: var(--muted);
    font-size: .92rem;
}
.help-term p:last-child,
.help-statuses p:last-child {
    margin-bottom: 0;
}
.help-list {
    margin: 0;
    padding-left: 20px;
}
.help-list li + li,
.help-example li + li {
    margin-top: 6px;
}
.help-example ol {
    margin-bottom: 0;
    padding-left: 22px;
}
@media (max-width: 759px) {
    .assignment-head { align-items: center; }
    .help-popover {
        position: fixed;
        right: auto;
        left: 12px;
        top: 72px;
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
        max-height: calc(100vh - 96px);
        max-height: calc(100dvh - 96px);
        overflow-y: auto;
        transform: none;
    }
    .task-action-menu-row,
    .process-action-menu-row,
    .action-menu,
    .action-menu-summary {
        width: 100%;
    }
    .task-action-toolbar {
        display: grid;
        align-items: stretch;
    }
    .claim-task-form,
    .claim-task-form .claim-task-button,
    .claim-task-disabled {
        display: flex;
        width: 100%;
    }
    .claim-task-form .claim-task-button,
    .claim-task-disabled {
        justify-content: center;
    }
    .primary-task-action,
    .primary-task-action .button-with-icon {
        width: 100%;
    }
    .primary-task-action .button-with-icon {
        justify-content: center;
    }
    .action-menu-summary {
        justify-content: center;
    }
    .action-menu[open]::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 78;
        background: rgba(15, 23, 42, .16);
    }
    .action-menu-popover {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        top: auto;
        z-index: 79;
        width: auto;
        max-height: calc(100dvh - 96px);
        overflow-y: auto;
        border-radius: 14px;
    }
    .topbar {
        gap: 12px;
    }
    .nav-desktop {
        display: none;
    }
    .nav-mobile-head {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 6px;
        width: 100%;
        min-width: 0;
    }
    .nav-mobile-head.nav-mobile-head-compact {
        display: flex;
        justify-content: flex-end;
    }
    .mobile-header-search {
        display: flex;
        min-width: 0;
        height: 42px;
    }
    .mobile-header-search input[type="search"] {
        padding-inline: 10px;
    }
    .mobile-header-search button {
        min-width: 38px;
        padding-inline: 8px;
    }
    .mobile-quick-start {
        min-width: 0;
        height: 42px;
        min-height: 42px;
        padding-inline: 9px;
        font-size: .8rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        white-space: nowrap;
    }
    .nav-mobile {
        display: grid;
        gap: 8px;
    }
    .nav-mobile-admin-scroll {
        max-height: calc(100vh - 148px);
        max-height: calc(100dvh - 148px);
        overflow-y: auto;
        overscroll-behavior: contain;
        padding-bottom: max(8px, env(safe-area-inset-bottom));
        scrollbar-width: thin;
    }
    .nav-mobile[hidden] {
        display: none !important;
    }
    .nav-mobile a,
    .nav-mobile-section summary {
        width: 100%;
        text-align: left;
        border-radius: 12px;
    }
    .nav-mobile-section {
        display: grid;
        gap: 8px;
    }
    .nav-mobile-section summary {
        cursor: pointer;
        list-style: none;
    }
    .nav-mobile-section summary::-webkit-details-marker {
        display: none;
    }
    .nav-mobile-section summary::after {
        content: "v";
        float: right;
        color: inherit;
        font-size: .9rem;
        line-height: 1.45;
    }
    .nav-mobile-section:not([open]) summary::after {
        content: ">";
    }
    .nav-mobile-section div {
        display: grid;
        gap: 6px;
        padding-left: 10px;
    }
    .nav-mobile .nav-rich-item {
        grid-template-columns: 36px minmax(0, 1fr);
        min-height: 50px;
        padding: 7px 9px;
        border-radius: 12px;
        font-size: .88rem;
        line-height: 1.22;
    }
    .nav-mobile .nav-rich-icon {
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }
    .nav-mobile .nav-rich-icon-svg {
        width: 22px;
        height: 22px;
        stroke-width: 1.8;
    }
    .nav-mobile-section summary.nav-mobile-summary-rich {
        grid-template-columns: 36px minmax(0, 1fr) auto;
    }
    .nav-mobile-section summary.nav-mobile-summary-rich::after {
        float: none;
        justify-self: end;
        margin-left: 8px;
    }
    .nav-mobile-admin-section div > a:not(.nav-rich-item) {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 10px 11px;
        border-radius: 12px;
        background: #fff;
        border: 1px solid #edf0f4;
        box-shadow: 0 6px 16px rgba(15, 23, 42, .035);
        white-space: normal;
    }
    .nav-mobile-admin-section div > a:not(.nav-rich-item):hover,
    .nav-mobile-admin-section div > a:not(.nav-rich-item):focus-visible {
        background: #f8fafc;
    }
    .topbar .nav-mobile .nav-mobile-admin-section div > a:not(.nav-rich-item).nav-current,
    .topbar .nav-mobile .nav-mobile-admin-section div > a:not(.nav-rich-item).nav-current:hover {
        background: #fff5f6;
        color: var(--primary-dark);
        border-color: rgba(176, 0, 32, .18);
    }
    input[type="time"] {
        min-height: 58px;
    }
    .help-hero,
    #grundidee,
    #grundbegriffe,
    #aufgaben,
    #dashboard-hilfe,
    #beispiel {
        scroll-margin-top: 142px;
    }
}
.task-number {
    margin-bottom: 4px;
    font-weight: 750;
    color: var(--text);
}
.warning-box {
    margin: 14px 0;
    max-width: 100%;
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    background: #fff7ed;
    color: #7c2d12;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.warning-box-critical {
    border-color: #fecdca;
    background: #fef3f2;
    color: #7a271a;
}
.warning-box-critical p {
    margin-bottom: 0;
}
.warning-box ul {
    margin: 10px 0 0;
    padding-left: 20px;
}
.finance-page-head {
    display: block;
}
.finance-page-head h1,
.finance-page-head h2 {
    margin-top: 0;
}
.finance-page-head p {
    max-width: 760px;
}
.finance-tabs {
    margin-top: -4px;
    display: inline-flex;
    vertical-align: top;
}
.finance-filter {
    align-items: end;
    margin: 0 0 16px;
    gap: 10px;
}
.finance-period-filter {
    display: flex;
    flex-wrap: wrap;
    max-width: 560px;
}
.finance-period-filter button,
.finance-account-filter button,
.finance-anomaly-filter button {
    width: auto;
    min-width: 104px;
    flex: 0 0 auto;
}
.finance-filter input,
.finance-filter select {
    min-width: 150px;
}
.finance-filter label {
    flex: 0 1 180px;
}
.finance-account-filter label:first-of-type {
    flex-basis: min(360px, 100%);
}
.finance-period-control {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: flex-end;
    gap: 10px;
    margin: -52px 0 16px auto;
    min-height: 52px;
    width: min(100%, 560px);
}
.finance-period-control label {
    flex: 0 1 160px;
}
.finance-period-control select {
    min-width: 0;
}
.finance-period-arrow {
    width: 42px;
    min-width: 42px;
    padding-right: 0;
    padding-left: 0;
    text-align: center;
}
.finance-period-arrow.is-disabled {
    opacity: .45;
    pointer-events: none;
}
.finance-control-summary {
    display: grid;
    gap: 8px;
    border-left: 4px solid var(--brand);
}
.finance-summary-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.finance-control-summary p {
    margin: 0;
    color: var(--muted);
}
.finance-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    margin: 0 0 16px;
    align-items: stretch;
}
.finance-metric {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    min-height: 126px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
}
.finance-metric-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.finance-metric-label > span,
.finance-preview-grid span,
.finance-detail-grid dt {
    display: block;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 800;
}
.finance-info-tip {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    text-align: center;
    line-height: 1;
}
.finance-info-tip .help-popover {
    text-align: left;
    line-height: 1.35;
    white-space: normal;
}
.finance-metric strong {
    display: block;
    margin-top: 6px;
    font-size: clamp(1.12rem, 1.75vw, 1.48rem);
    line-height: 1.15;
    overflow-wrap: anywhere;
}
.finance-metric small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
}
.finance-amount {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.finance-amount-negative {
    color: #b42318;
}
.finance-amount-positive {
    color: #067647;
}
.finance-chart-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: start;
}
.finance-overview-layout {
    display: grid;
    gap: 16px;
}
.finance-overview-row {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(260px, .85fr);
    gap: 16px;
    align-items: start;
}
.finance-overview-full {
    min-width: 0;
}
.finance-bars {
    display: grid;
    gap: 10px;
}
.finance-compare-bars {
    display: grid;
    gap: 14px;
}
.finance-bar-row {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(70px, .8fr) minmax(112px, max-content);
    gap: 10px;
    align-items: center;
    min-width: 0;
}
.finance-bar-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 700;
}
.finance-bar-track {
    height: 12px;
    border-radius: 999px;
    background: #eef2f6;
    overflow: hidden;
}
.finance-bar-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
}
.finance-bar-track .is-positive {
    background: #47cd89;
}
.finance-bar-track .is-negative {
    background: #f97066;
}
.finance-compare-row {
    display: grid;
    grid-template-columns: minmax(180px, .75fr) minmax(0, 1.5fr);
    gap: 14px;
    align-items: start;
    min-width: 0;
}
.finance-compare-lines {
    display: grid;
    gap: 6px;
}
.finance-compare-lines div {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) minmax(110px, max-content);
    gap: 8px;
    align-items: center;
    min-width: 0;
}
.finance-compare-lines span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}
.finance-compare-lines b {
    display: block;
    height: 10px;
    border-radius: 999px;
    background: #eef2f6;
}
.finance-compare-lines b.is-positive {
    background: #47cd89;
}
.finance-compare-lines b.is-negative {
    background: #f97066;
}
.finance-compare-lines b.is-plan {
    background: #98a2b3;
}
.finance-compare-lines em {
    font-style: normal;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.finance-statement {
    display: grid;
    gap: 16px;
}
.finance-statement-section {
    display: grid;
    gap: 0;
}
.finance-statement-section h3,
.finance-driver-columns h3 {
    margin: 0 0 8px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f1f5f9;
    color: var(--text);
    font-size: .9rem;
    font-weight: 900;
    text-transform: none;
}
.finance-statement-detail {
    border-top: 1px solid var(--border);
}
.finance-statement-detail summary {
    list-style: none;
    cursor: pointer;
    border-radius: 8px;
}
.finance-statement-detail summary::-webkit-details-marker {
    display: none;
}
.finance-statement-detail summary:hover,
.finance-statement-detail[open] summary {
    background: #f8fafc;
}
.finance-statement-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(108px, max-content)) minmax(92px, max-content);
    gap: 12px;
    align-items: center;
    min-width: 0;
    padding: 12px;
}
.finance-statement-label {
    min-width: 0;
}
.finance-statement-label strong,
.finance-driver-title strong,
.finance-position-title strong {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.finance-statement-label strong {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100% - 34px);
    vertical-align: middle;
}
.finance-note-chip,
.finance-note-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    min-width: 22px;
    margin: 0;
    padding: 0;
    border: 1px solid #d0d5dd;
    border-radius: 999px;
    background: #f8fafc;
    color: var(--muted);
    font-size: .74rem;
    font-weight: 800;
    line-height: 1;
    vertical-align: middle;
}
.finance-note-chip.has-note,
.finance-note-indicator.has-note {
    border-color: #a6f4c5;
    background: #ecfdf3;
    color: #067647;
}
.finance-note-indicator.has-child-note {
    border-color: #b9e6fe;
    background: #eff8ff;
    color: #175cd3;
}
.finance-chevron::before {
    content: "›";
    display: inline-block;
    width: 16px;
    color: var(--muted);
    font-weight: 900;
    transform: translateY(-1px);
}
.finance-statement-detail[open] .finance-chevron::before {
    content: "⌄";
}
.finance-statement-label span,
.finance-statement-row div > span,
.finance-position-values dt,
.finance-driver-item dt {
    display: block;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
}
.finance-statement-label .finance-note-chip {
    display: inline-flex;
    color: var(--muted);
}
.finance-statement-label .finance-note-chip.has-note {
    color: #067647;
}
.finance-statement-label .finance-note-indicator {
    display: inline-flex;
    margin-left: 6px;
}
.finance-statement-row div:not(.finance-statement-label) {
    text-align: right;
}
.finance-statement-row div:not(.finance-statement-label) strong,
.finance-position-values dd,
.finance-driver-item dd {
    margin: 2px 0 0;
    font-weight: 800;
}
.finance-statement-status {
    text-align: left !important;
}
.finance-statement-status .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 82px;
    text-align: center;
}
.finance-statement-detail-body {
    display: grid;
    gap: 12px;
    margin: 0 0 14px 28px;
    padding: 14px;
    border: 1px solid var(--border);
    border-left: 4px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
}
.finance-note-box {
    display: grid;
    gap: 8px;
    position: relative;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8fafc;
}
.finance-note-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.finance-note-head span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
}
.finance-note-box p {
    margin: 0;
}
.finance-note-text {
    color: var(--text);
}
.finance-note-box-warning {
    border-color: #fedf89;
    background: #fffbeb;
}
.finance-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.finance-note-popover-wrap,
.finance-note-editor {
    position: relative;
    display: inline-block;
}
.finance-note-popover-wrap summary,
.finance-note-editor summary,
.finance-month-detail summary {
    list-style: none;
}
.finance-note-popover-wrap summary::-webkit-details-marker,
.finance-note-editor summary::-webkit-details-marker,
.finance-month-detail summary::-webkit-details-marker {
    display: none;
}
.finance-note-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 30px;
    height: 30px;
    min-width: 30px;
    padding: 0;
    border: 1px solid #d0d5dd;
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 850;
    line-height: 1;
    cursor: pointer;
}
.finance-note-popover-wrap.has-note > .finance-note-trigger {
    border-color: #a6f4c5;
    background: #ecfdf3;
    color: #067647;
}
.finance-note-trigger.secondary {
    width: auto;
    min-width: 0;
    margin-top: 8px;
    padding: 0 10px;
}
.finance-note-popover {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    z-index: 45;
    display: grid;
    gap: 8px;
    width: min(420px, calc(100vw - 36px));
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow);
}
.finance-note-popover-wrap:not([open]) .finance-note-popover,
.finance-note-editor:not([open]) .finance-note-editor-panel {
    display: none;
}
.finance-note-editor-panel {
    display: grid;
    gap: 8px;
}
.finance-note-form {
    display: grid;
    gap: 8px;
}
.finance-note-form textarea {
    width: 100%;
    min-height: 86px;
    resize: vertical;
}
.finance-overview-notes {
    width: 100%;
}
.finance-driver-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.finance-driver-list {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}
.finance-driver-item {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
}
.finance-driver-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}
.finance-driver-title strong {
    flex: 1 1 auto;
}
.finance-driver-item dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0 0;
}
.finance-driver-item dd,
.finance-position-values dd {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.finance-position-list {
    display: grid;
    gap: 10px;
}
.finance-position-card {
    display: grid;
    grid-template-columns: minmax(240px, .9fr) minmax(360px, 1.6fr);
    gap: 18px;
    min-width: 0;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
}
.finance-position-main,
.finance-position-values,
.finance-position-card details {
    min-width: 0;
}
.finance-position-title {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: baseline;
    min-width: 0;
}
.finance-position-title span {
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    padding: 2px 7px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #f8fafc;
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: .78rem;
    font-weight: 800;
}
.finance-position-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.finance-position-values {
    display: grid;
    grid-template-columns: repeat(4, minmax(94px, 1fr));
    gap: 10px;
    margin: 0;
}
.finance-position-values div {
    min-width: 0;
}
.finance-position-card details {
    grid-column: 1 / -1;
}
.finance-table th,
.finance-table td {
    white-space: nowrap;
    vertical-align: top;
}
.finance-table td:first-child,
.finance-table td:nth-child(2) {
    white-space: normal;
    min-width: 160px;
}
.finance-account-table th,
.finance-account-table td {
    font-size: .86rem;
}
.finance-table-compact th,
.finance-table-compact td,
.finance-account-table th,
.finance-account-table td {
    padding-right: 10px;
    padding-left: 10px;
}
.finance-account-table td:nth-child(n+4),
.finance-account-table th:nth-child(n+4),
.finance-table-compact td:nth-child(n+2),
.finance-table-compact th:nth-child(n+2) {
    text-align: right;
}
.finance-account-table td:last-child,
.finance-account-table th:last-child,
.finance-table-compact td:last-child,
.finance-table-compact th:last-child {
    text-align: left;
}
.finance-row-group td:first-child,
.finance-row-group td:nth-child(2),
.finance-row-summary td:first-child,
.finance-row-summary td:nth-child(2) {
    color: var(--muted);
}
.finance-row-group strong,
.finance-row-summary strong {
    font-weight: 800;
}
.finance-month-detail {
    margin-top: 6px;
}
.finance-month-detail summary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    padding: 6px 10px;
    border: 1px solid #d0d5dd;
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}
.finance-month-detail summary::before {
    content: ">";
    color: var(--primary);
    font-weight: 900;
}
.finance-month-detail[open] summary::before {
    content: "v";
}
.finance-month-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    margin-top: 8px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
}
.finance-month-grid span {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 8px;
    border-radius: 8px;
    background: #fff;
}
.finance-month-grid b,
.finance-month-grid em {
    font-size: .78rem;
}
.finance-month-grid em {
    font-style: normal;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.finance-empty-state {
    max-width: 760px;
}
.finance-anomaly-list {
    display: grid;
    gap: 10px;
}
.finance-anomaly-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, auto);
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
}
.finance-anomaly-main {
    min-width: 0;
}
.finance-anomaly-values {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px 14px;
    margin: 0;
}
.finance-anomaly-values div {
    min-width: 96px;
}
.finance-anomaly-values dt {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
}
.finance-anomaly-values dd {
    margin: 2px 0 0;
    font-weight: 800;
    text-align: right;
}
.finance-preview-grid,
.finance-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin: 14px 0;
}
.finance-preview-grid div,
.finance-detail-grid div {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8fafc;
}
.finance-preview-grid strong,
.finance-detail-grid dd {
    display: block;
    margin: 4px 0 0;
    font-weight: 800;
    overflow-wrap: anywhere;
}
.finance-detail-grid {
    padding: 0;
}
.finance-detail-grid dd {
    margin-left: 0;
}
.finance-warning-list {
    margin: 8px 0 0;
    padding-left: 20px;
}
.finance-import-form {
    display: grid;
    gap: 12px;
}
@media (max-width: 720px) {
    .finance-period-control {
        justify-content: flex-start;
        margin-top: 0;
        width: 100%;
    }
    .finance-period-control label {
        flex: 1 1 calc(50% - 52px);
    }
    .finance-period-arrow {
        flex: 0 0 42px;
    }
    .finance-period-filter,
    .finance-account-filter,
    .finance-anomaly-filter {
        max-width: none;
    }
    .finance-filter label,
    .finance-filter button {
        flex-basis: 100%;
        width: 100%;
    }
    .finance-overview-row {
        grid-template-columns: 1fr;
    }
    .finance-bar-row {
        grid-template-columns: minmax(0, 1fr) minmax(96px, max-content);
        gap: 6px;
    }
    .finance-bar-row .finance-bar-track {
        grid-column: 1 / -1;
        grid-row: 2;
    }
    .finance-compare-row {
        grid-template-columns: 1fr;
    }
    .finance-bar-track {
        width: 100%;
    }
    .finance-statement-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px 12px;
    }
    .finance-statement-label,
    .finance-statement-status {
        grid-column: 1 / -1;
    }
    .finance-statement-row div:not(.finance-statement-label) {
        text-align: left;
    }
    .finance-statement-detail-body {
        margin-left: 0;
    }
    .finance-driver-columns,
    .finance-position-card {
        grid-template-columns: 1fr;
    }
    .finance-position-values,
    .finance-driver-item dl {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .finance-month-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .finance-anomaly-item {
        grid-template-columns: 1fr;
    }
    .finance-anomaly-values {
        justify-content: flex-start;
    }
    .finance-anomaly-values dd {
        text-align: left;
    }
}
.success-box {
    margin: 14px 0;
    padding: 14px 16px;
    border: 1px solid #abefc6;
    border-radius: 12px;
    background: var(--ok-bg);
    color: var(--ok);
}
.email-verification-card {
    max-width: 680px;
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}
.email-verification-card .actions {
    justify-content: center;
}
.email-verification-card .small {
    margin: 8px auto 0;
}
.email-verification-pending-box {
    max-width: 560px;
    margin: 16px auto;
    padding: 16px 18px;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    background: #fff7ed;
    color: #7c2d12;
    text-align: center;
}
.email-verification-pending-box .small {
    color: #9a5b00;
}
.email-verification-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0 18px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fbfcfe;
}
@media (max-width: 640px) {
    .email-verification-row {
        align-items: flex-start;
        flex-direction: column;
    }
}
.permission-wait-card {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}
.permission-wait-card p {
    font-size: 1rem;
}
.nav-pending,
.nav-pending-head {
    margin-left: auto;
}
.sso-requests-head {
    display: grid;
    gap: 16px;
}
.sso-request-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.sso-request-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    background: #f7f8fb;
    font-size: .92rem;
}
.sso-request-tab:hover {
    text-decoration: none;
    background: #eef2f7;
}
.sso-request-tab.is-active {
    border-color: var(--primary);
    color: #fff;
    background: var(--primary);
}
.sso-request-tab strong {
    min-width: 24px;
    padding: 2px 7px;
    border-radius: 999px;
    text-align: center;
    font-size: .78rem;
    background: rgba(0, 0, 0, .08);
}
.sso-request-tab.is-active strong {
    background: rgba(255, 255, 255, .22);
}
.sso-request-list {
    display: grid;
    gap: 14px;
}
.sso-request-card {
    display: grid;
    gap: 14px;
}
.sso-request-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.sso-request-card-head h2 {
    margin-bottom: 4px;
    font-size: 1.18rem;
}
.sso-request-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin: 0;
}
.sso-request-meta-grid div {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfcfe;
}
.sso-request-meta-grid dt {
    margin-bottom: 3px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
}
.sso-request-meta-grid dd {
    margin: 0;
    overflow-wrap: anywhere;
}
.sso-request-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}
.sso-action-card {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfcfe;
}
.sso-action-card summary {
    cursor: pointer;
    font-weight: 700;
}
.sso-action-card form {
    margin-top: 12px;
}
.sso-action-card-danger {
    background: #fff8f7;
}
.sso-user-links {
    display: grid;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.magic-link-user-panel {
    display: grid;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.magic-link-user-panel h2 {
    margin-bottom: 0;
    font-size: 1.05rem;
}
.sso-user-links h2 {
    margin-bottom: 0;
    font-size: 1.05rem;
}
.sso-user-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}
.sso-user-status-grid div {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}
.sso-user-status-grid span {
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
}
.sso-user-link-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfcfe;
}
.sso-user-link-row span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: .88rem;
    overflow-wrap: anywhere;
}
@media (max-width: 760px) {
    .sso-request-card-head,
    .sso-user-link-row {
        align-items: stretch;
        flex-direction: column;
    }
    .sso-request-actions {
        grid-template-columns: 1fr;
    }
    .sso-user-link-row form,
    .sso-user-link-row button {
        width: 100%;
    }
}
.starter-module {
    margin: 14px 0 18px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fbfcfe;
}
.starter-module h2 { margin-bottom: 6px; }
.movement-hero {
    display: grid;
    gap: 14px;
}
.movement-hero h1 {
    margin-bottom: 4px;
}
.movement-hero p {
    margin-bottom: 0;
}
.movement-month-picker {
    display: grid;
    gap: 10px;
}
.month-filter,
.movement-month-picker {
    align-items: end;
}
.month-stepper {
    display: flex;
    gap: 6px;
    align-items: end;
}
.month-stepper .button {
    min-width: 38px;
    justify-content: center;
    padding-inline: 12px;
    font-size: 1.05rem;
}
.fuel-summary-row {
    display: grid;
    grid-template-columns: minmax(520px, 1fr) minmax(260px, 320px);
    gap: 24px;
    align-items: start;
}
.fuel-summary-row .movement-summary {
    grid-template-columns: repeat(4, minmax(112px, 1fr));
}
.month-lock-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fafc;
    color: var(--text);
}
.month-lock-card .lock-icon {
    display: inline-grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 999px;
    background: #eef1f5;
}
.month-lock-card strong,
.month-lock-card span {
    display: block;
}
.month-lock-card span {
    margin-top: 2px;
    color: var(--muted);
    font-size: .9rem;
}
.movement-month-picker label {
    margin-top: 0;
}
.movement-overview {
    display: grid;
    gap: 16px;
}
.movement-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.movement-summary .kpi {
    min-height: 0;
    padding: 10px 12px;
    box-shadow: none;
}
.movement-summary .kpi strong {
    font-size: 1.35rem;
}
.movement-summary .kpi span {
    font-size: .82rem;
    line-height: 1.18;
    overflow-wrap: anywhere;
}
.movement-progress {
    display: grid;
    gap: 7px;
}
.progress-track {
    width: 100%;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8edf4;
}
.progress-track span {
    display: block;
    min-width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--ok);
}
.movement-list-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.movement-list-head h2 {
    margin-bottom: 0;
}
.vehicle-overview-list-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 14px;
    margin-bottom: 14px;
}
.vehicle-overview-list-head h2 {
    margin-bottom: 0;
}
.vehicle-overview-sort {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 700;
}
.vehicle-overview-sort-segments {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f6f7f9;
}
.vehicle-overview-sort-segments form {
    display: flex;
    margin: 0;
}
.vehicle-overview-sort-button,
.vehicle-overview-sort-button:hover,
.vehicle-overview-sort-button:disabled,
.vehicle-overview-sort-button:disabled:hover {
    min-height: 32px;
    padding: 6px 9px;
    border-color: transparent;
    border-radius: 9px;
    background: transparent;
    color: #475467;
    box-shadow: none;
    font-size: .84rem;
    line-height: 1.15;
}
.vehicle-overview-sort-button:hover {
    background: #e8edf4;
}
.vehicle-overview-sort-button.is-active,
.vehicle-overview-sort-button.is-active:hover,
.vehicle-overview-sort-button.is-active:disabled,
.vehicle-overview-sort-button.is-active:disabled:hover {
    background: #fff;
    color: var(--text);
    opacity: 1;
    cursor: default;
}
.vehicle-overview-sort-status {
    color: var(--muted);
    font-weight: 600;
}
.vehicle-overview-sort-status.is-error {
    color: var(--danger);
}
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.filter-chips .is-active,
.filter-chips .is-active:hover {
    background: var(--primary);
    color: #fff;
}
.movement-desktop-table th .small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 600;
    text-transform: none;
}
.movement-desktop-table-wrap {
    display: none;
}
.movement-desktop-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.movement-desktop-table th,
.movement-desktop-table td {
    padding: 11px 10px;
    border-top: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
    font-size: .9rem;
}
.movement-desktop-table thead th {
    border-top: 0;
    color: var(--muted);
    font-size: .78rem;
    text-transform: uppercase;
}
.movement-desktop-table td span:not(.badge) {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: .82rem;
}
.movement-desktop-table th:nth-child(1) { width: 19%; }
.movement-desktop-table th:nth-child(2) { width: 14%; }
.movement-desktop-table th:nth-child(3) { width: 17%; }
.movement-desktop-table th:nth-child(4) { width: 10%; }
.movement-desktop-table th:nth-child(5) { width: 11%; }
.movement-desktop-table th:nth-child(6) { width: 14%; }
.movement-desktop-table th:nth-child(7) { width: 15%; }
.movement-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px;
}
.movement-mobile-cards {
    display: grid;
    gap: 10px;
}
.movement-card dl {
    display: grid;
    gap: 8px;
    margin: 12px 0 0;
}
.movement-card dl div {
    display: grid;
    gap: 2px;
}
.movement-card dt {
    color: var(--muted);
    font-size: .78rem;
}
.movement-card dd {
    margin: 0;
    font-size: .9rem;
}
.inline-details summary { list-style: none; }
.inline-details summary::-webkit-details-marker { display: none; }
.inline-details form {
    width: min(320px, calc(100vw - 56px));
    margin-top: 8px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}
.field-label-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 28px;
    margin: 12px 0 6px;
}
.field-label-action label {
    margin: 0;
}
.provider-row {
    display: grid;
    gap: 10px;
}
.invoice-position-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
}
.invoice-position-item summary:hover strong {
    color: var(--brand);
}
.invoice-position-item summary > span:first-child {
    min-width: 0;
}
.invoice-position-item summary::-webkit-details-marker {
    display: none;
}
.invoice-position-item form {
    border-top: 1px solid var(--border);
    padding-top: 12px;
}
.fuel-compare-list {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}
.fuel-compare-group {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
}
.fuel-compare-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #eef1f5;
}
.fuel-compare-heading span {
    color: var(--muted);
    font-size: .88rem;
    font-weight: 700;
    white-space: nowrap;
}
.fuel-compare-labels,
.fuel-compare-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.fuel-compare-labels {
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}
.fuel-compare-labels span,
.fuel-compare-cell {
    padding: 10px 14px;
}
.fuel-compare-labels span:first-child,
.fuel-compare-cell:first-child {
    border-right: 1px solid var(--border);
}
.fuel-compare-row + .fuel-compare-row {
    border-top: 1px solid var(--border);
}
.fuel-compare-cell {
    min-width: 0;
    background: #fff;
}
.fuel-compare-empty {
    display: flex;
    align-items: center;
    color: var(--muted);
    background: #fafbfc;
    font-size: .92rem;
}
.fuel-provider-summary {
    margin-top: 16px;
}
.fuel-provider-summary summary {
    color: var(--muted);
    cursor: pointer;
    font-weight: 800;
}
.movement-status-panel .list {
    margin-top: 12px;
}
.movement-vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.movement-vehicle-card {
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
    padding: 10px;
    border: 1px solid #e2e7ef;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(16, 24, 40, .05);
}
.movement-vehicle-card.is-muted {
    background: #fbfcfe;
    opacity: 1;
    border-color: #e7ebf2;
    box-shadow: 0 6px 14px rgba(16, 24, 40, .035);
}
.movement-vehicle-card.is-muted .vehicle-photo-button,
.movement-vehicle-card.is-muted .movement-vehicle-card-head,
.movement-vehicle-card.is-muted .movement-vehicle-meta {
    opacity: .72;
}
.movement-vehicle-card.is-muted .movement-status-badge-wrap,
.movement-vehicle-card.is-muted .movement-status-popover {
    opacity: 1;
}
.vehicle-photo-button {
    display: grid;
    place-items: center;
    width: 94px;
    height: 72px;
    padding: 6px;
    border: 1px solid #e4e9f1;
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    box-shadow: none;
    cursor: zoom-in;
}
.vehicle-photo-button:hover {
    border-color: #cbd5e1;
    background: #fff;
}
.vehicle-photo-button-table {
    width: 66px;
    height: 52px;
    padding: 5px;
    border-radius: 9px;
}
.vehicle-photo-button-card {
    width: 76px;
    height: 58px;
    padding: 5px;
    border-radius: 9px;
}
.vehicle-photo-button-record {
    width: 150px;
    height: 112px;
    padding: 7px;
}
.vehicle-photo-button img,
.vehicle-photo-admin-preview img,
.vehicle-admin-item > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.vehicle-inline-summary {
    display: grid;
    grid-template-columns: 66px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
}
.vehicle-inline-copy {
    min-width: 0;
}
.vehicle-inline-copy strong,
.vehicle-inline-copy span,
.vehicle-inline-copy .small {
    overflow-wrap: anywhere;
}
.vehicle-record-head {
    display: grid;
    gap: 16px;
}
.vehicle-record-photo {
    display: flex;
    align-items: flex-start;
}
.vehicle-record-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin: 16px 0 0;
}
.vehicle-record-facts div {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
}
.vehicle-record-facts dt {
    color: var(--muted);
    font-size: .78rem;
}
.vehicle-record-facts dd {
    margin: 3px 0 0;
    font-weight: 700;
    overflow-wrap: anywhere;
}
.vehicle-record-km {
    margin: 4px 0 0;
    font-size: 1.25rem;
}
.vehicle-record-section-grid {
    display: grid;
    gap: 18px;
}
.vehicle-record-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.vehicle-record-section-head h2 {
    margin-bottom: 0;
}
.vehicle-record-section-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px 12px;
    margin-bottom: 12px;
}
.vehicle-record-section-title-row .vehicle-record-section-head {
    flex: 1 1 260px;
    min-width: 0;
    margin-bottom: 0;
}
.vehicle-record-process-scope {
    flex: 0 1 auto;
    justify-content: flex-end;
}
.vehicle-record-process-scope .comment-list-controls {
    max-width: 100%;
}
@media (max-width: 520px) {
    .vehicle-record-section-title-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }
    .vehicle-record-process-scope {
        justify-self: stretch;
        width: 100%;
    }
    .vehicle-record-process-scope .comment-list-controls {
        width: 100%;
        overflow-x: auto;
    }
    .vehicle-record-process-scope .comment-filter-pill {
        flex: 1 1 0;
        min-width: 0;
    }
}
.movement-card-vehicle {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}
.movement-vehicle-card-body {
    display: grid;
    gap: 6px;
    min-width: 0;
}
.movement-vehicle-card-head {
    display: grid;
    gap: 6px;
}
.movement-vehicle-card-head h3 {
    margin: 0;
    color: var(--text);
    font-size: .95rem;
    line-height: 1.2;
}
.movement-vehicle-card-head h3 + span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: .84rem;
}
.movement-vehicle-statuses {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.movement-status-badge-wrap {
    position: relative;
    display: inline-flex;
}
.movement-status-badge {
    min-height: 24px;
    padding: 4px 7px;
    border: 0;
    cursor: help;
}
.movement-status-badge.status-open:hover {
    color: var(--info);
    background: var(--info-bg);
}
.movement-status-badge.status-claimed:hover {
    color: var(--warning);
    background: var(--warning-bg);
}
.movement-status-badge.status-done:hover {
    color: var(--ok);
    background: var(--ok-bg);
}
.movement-status-badge.status-escalated:hover,
.movement-status-badge.status-cancelled:hover {
    color: var(--danger);
    background: var(--danger-bg);
}
.movement-status-badge.status-archived:hover {
    color: var(--muted);
    background: #eef1f5;
}
.movement-status-badge.badge-soft:hover {
    color: var(--primary);
    background: var(--soft);
}
.badge-info {
    display: inline-grid;
    place-items: center;
    width: 14px;
    height: 14px;
    margin-left: 5px;
    border-radius: 999px;
    background: rgba(255,255,255,.72);
    font-size: .66rem;
    font-weight: 900;
    line-height: 1;
}
.movement-status-popover {
    position: fixed;
    z-index: 140;
    width: min(360px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    box-shadow: var(--shadow);
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.35;
    opacity: 1;
    box-sizing: border-box;
    overflow-wrap: break-word;
    overflow-y: auto;
    pointer-events: none;
    text-align: left;
    white-space: normal;
}
.movement-vehicle-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    color: var(--muted);
    font-size: .84rem;
}
.movement-vehicle-meta > span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid #e4e9f1;
    border-radius: 999px;
    background: #f8fafc;
}
.vehicle-transmission-badge {
    border: 1px solid #d8dee8;
    color: #344054;
    font-weight: 500;
}
.vehicle-lightbox {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 22px;
}
.vehicle-lightbox[hidden] {
    display: none;
}
.vehicle-lightbox-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    border-radius: 0;
    background: rgba(15, 23, 42, .72);
    box-shadow: none;
}
.vehicle-lightbox-backdrop:hover,
.vehicle-lightbox-backdrop:focus {
    background: rgba(15, 23, 42, .72);
    box-shadow: none;
    outline: none;
}
.vehicle-lightbox-dialog {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
    width: min(880px, 100%);
    max-height: 90vh;
    margin: 0;
    padding: 16px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 16px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 22px 60px rgba(15, 23, 42, .28);
}
.vehicle-lightbox-dialog img {
    width: 100%;
    max-height: calc(90vh - 92px);
    object-fit: contain;
    cursor: zoom-out;
}
.vehicle-lightbox-dialog figcaption {
    color: var(--muted);
    font-size: .92rem;
    font-weight: 750;
    text-align: center;
}
.vehicle-lightbox-close {
    position: absolute;
    top: 8px;
    right: 8px;
}
body.vehicle-lightbox-open {
    overflow: hidden;
}
.vehicle-photo-admin-field {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    margin-top: 12px;
}
.vehicle-photo-admin-preview {
    display: grid;
    place-items: center;
    width: 112px;
    height: 86px;
    padding: 6px;
    border: 1px solid #e4e9f1;
    border-radius: 10px;
    background: #fff;
}
.vehicle-photo-delete-form {
    margin-top: 10px;
}
.vehicle-admin-list {
    gap: 10px;
}
.vehicle-admin-item {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}
.vehicle-admin-item > img {
    width: 76px;
    height: 56px;
    padding: 4px;
    border: 1px solid #e4e9f1;
    border-radius: 8px;
    background: #fff;
}
.vehicle-admin-copy {
    min-width: 0;
}
.movement-status-panel summary {
    display: grid;
    gap: 4px;
    padding-left: 22px;
    position: relative;
}
.movement-status-panel summary::before {
    content: "▸";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.35;
    transition: transform .15s ease;
}
.movement-status-panel[open] summary::before {
    transform: rotate(90deg);
}
.movement-status-panel .summary-hint {
    display: block;
    color: var(--muted);
    font-size: .92rem;
    font-weight: 500;
    line-height: 1.35;
}
.movement-request-form {
    min-width: 0;
    overflow: hidden;
}
.movement-request-form input[type="date"],
.movement-request-form input[type="time"] {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 48px;
}
.movement-reject-form .small {
    margin-bottom: 6px;
}
.month-picker-actions {
    align-self: end;
    margin-top: 0;
}
.dashboard-section-heading {
    margin: 22px 0 12px;
    font-size: 1.15rem;
}
.dashboard-grouped-list {
    display: grid;
    gap: 18px;
}
.dashboard-group {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fbfcfe;
}
.dashboard-group-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 12px 14px;
    background: #eef1f5;
    color: var(--text);
    font-size: .98rem;
    cursor: pointer;
    list-style: none;
}
.dashboard-group-heading::-webkit-details-marker {
    display: none;
}
.dashboard-group-heading::before {
    content: '▾';
    margin-right: 0;
    color: var(--muted);
    font-size: 1.05rem;
    transition: transform .16s ease;
}
.dashboard-group:not([open]) .dashboard-group-heading::before {
    transform: rotate(-90deg);
}
.dashboard-group-heading span:first-of-type {
    flex: 1;
}
.dashboard-group-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    font-size: .84rem;
    font-weight: 800;
}
.dashboard-compact-list {
    display: grid;
}
.dashboard-compact-row {
    display: block;
    padding: 12px 14px;
    color: inherit;
    border-top: 1px solid var(--border);
    background: #fff;
}
.dashboard-compact-row:first-child {
    border-top: 0;
}
.dashboard-compact-row:hover {
    background: #fcfdff;
    text-decoration: none;
}
.dashboard-row-status {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.dashboard-group .list-expand-button {
    margin: 0;
    width: 100%;
    justify-content: flex-start;
    border-radius: 0;
    padding: 10px 14px;
    background: #f7f8fb;
}
.dashboard-group .list-expand-button:hover {
    background: #eef1f5;
}
.dashboard-panel {
    padding: 0;
    min-height: 0;
    align-self: start;
}
.dashboard-panel-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
    cursor: pointer;
    list-style: none;
}
.dashboard-panel-heading::-webkit-details-marker {
    display: none;
}
.dashboard-panel-heading:hover {
    background: #fbfcfe;
}
.dashboard-panel-heading:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 3px rgba(102, 112, 133, .18);
}
.dashboard-panel-heading::before {
    content: '▾';
    color: var(--muted);
    font-size: 1.12rem;
    line-height: 1;
    transition: transform .16s ease;
}
.dashboard-panel:not([open]) .dashboard-panel-heading::before {
    transform: rotate(-90deg);
}
.dashboard-panel-heading h2 {
    margin: 0;
}
.dashboard-panel-heading h2 .help-tip {
    font-size: .78rem;
    font-weight: 800;
}
.dashboard-panel-body {
    padding: 0 16px 16px;
}
.dashboard-panel:not([open]) .dashboard-panel-heading {
    padding-bottom: 16px;
    border-radius: calc(var(--radius) - 1px);
}
.dashboard-panel:not([open]) .dashboard-panel-body {
    display: none;
}
.grid > .dashboard-panel {
    min-height: 0;
}
.dashboard-starter-tile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.dashboard-starter-tile-card {
    display: flex;
    position: relative;
}
.dashboard-starter-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 126px;
    padding: 16px;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    text-decoration: none;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
    width: 100%;
}
.dashboard-starter-tile:hover {
    color: var(--text);
    border-color: color-mix(in srgb, var(--primary) 48%, var(--border));
    box-shadow: 0 8px 18px rgba(15, 23, 42, .09);
    transform: translateY(-1px);
    text-decoration: none;
}
.dashboard-starter-tile:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--primary) 35%, transparent);
    outline-offset: 2px;
    border-color: var(--primary);
}
.dashboard-starter-tile-icon {
    display: grid;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    place-items: center;
    color: var(--primary);
    background: #fff2f0;
    border-radius: 13px;
}
.dashboard-starter-tile-icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}
.dashboard-starter-tile-icon-warning {
    color: var(--primary);
    background: #fff2f0;
}
.dashboard-starter-tile-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}
.dashboard-starter-tile-copy strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 1rem;
    line-height: 1.35;
    max-height: 2.7em;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.dashboard-starter-tile-copy > span {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.42;
    max-height: 4.26em;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}
.dashboard-starter-favorite-form {
    position: absolute;
    top: 10px;
    right: 10px;
    margin: 0;
}
.dashboard-starter-favorite {
    display: grid;
    width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;
    color: #94a3b8;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
    font-size: 1rem;
}
.dashboard-starter-favorite.is-selected {
    color: #a16207;
    background: #fef9c3;
    border-color: #eab308;
}
@media (hover: hover) and (pointer: fine) {
    .dashboard-starter-favorite:not(.is-selected):hover {
        color: #a16207;
        background: #fef9c3;
        border-color: #eab308;
    }
}
.dashboard-starter-favorite:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--primary) 35%, transparent);
    outline-offset: 2px;
}
.dashboard-starter-tile-actions {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}
.dashboard-tile-settings {
    margin: 20px 0;
}
.dashboard-tile-settings h2 {
    margin-top: 0;
}
.dashboard-tile-icon-options {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
}
.dashboard-tile-icon-options legend {
    margin-bottom: 8px;
    font-weight: 700;
}
.dashboard-tile-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}
.dashboard-tile-icon-choice {
    position: relative;
    display: block;
    min-width: 0;
    margin: 0;
    cursor: pointer;
}
.dashboard-tile-icon-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.dashboard-tile-icon-choice > span {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 7px 9px;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: .88rem;
    font-weight: 600;
}
.dashboard-tile-icon-choice > span > span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.2;
}
.dashboard-tile-icon-choice input:checked + span {
    color: var(--primary);
    background: #fff5f4;
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}
.dashboard-tile-icon-choice input:focus-visible + span {
    outline: 3px solid color-mix(in srgb, var(--primary) 35%, transparent);
    outline-offset: 2px;
}
.dashboard-tile-icon-preview {
    display: grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    place-items: center;
    color: var(--primary);
    background: #fff2f0;
    border-radius: 8px;
}
.dashboard-tile-icon-preview svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}
@media (max-width: 480px) {
    .dashboard-tile-icon-grid {
        grid-template-columns: 1fr;
    }
}
.process-start-intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.process-start-intro h1 {
    margin: 0;
}
.process-start-intro-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}
.process-start-settings-wrap {
    position: relative;
}
.process-start-settings-wrap summary {
    list-style: none;
}
.process-start-settings-wrap summary::-webkit-details-marker {
    display: none;
}
.process-start-help.help-tip,
.process-start-settings-toggle {
    display: grid;
    width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
}
.process-start-help.help-tip {
    font-size: 1rem;
    font-weight: 700;
}
.process-start-settings-toggle:hover,
.process-start-settings-toggle:focus-visible {
    color: var(--primary);
    border-color: var(--primary);
    background: #fff5f4;
}
.process-start-settings-toggle:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--primary) 35%, transparent);
    outline-offset: 2px;
}
.process-start-settings-toggle .button-icon {
    width: 18px;
    height: 18px;
}
.process-start-settings-popover {
    position: absolute;
    z-index: 30;
    top: calc(100% + 8px);
    right: 0;
    width: min(320px, calc(100vw - 32px));
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow);
}
.process-start-settings-wrap:not([open]) .process-start-settings-popover {
    display: none;
}
.process-start-settings-popover p {
    margin: 0;
}
.process-start-settings-popover form {
    margin-top: 12px;
}
.process-start-toast {
    position: fixed;
    z-index: 80;
    right: 20px;
    bottom: 20px;
    max-width: min(380px, calc(100vw - 32px));
    padding: 12px 14px;
    color: #fff;
    background: #24364a;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(16, 24, 40, .22);
}
.process-start-toast.is-error {
    background: var(--danger);
}
@media (max-width: 640px) {
    .process-start-toast {
        right: 16px;
        bottom: 16px;
        left: 16px;
        max-width: none;
    }
}
.process-template-fixed {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
}
@media (max-width: 640px) {
    .process-template-fixed {
        align-items: flex-start;
        flex-direction: column;
    }
}
@media (max-width: 640px) {
    .dashboard-starter-tile-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-starter-tile {
        min-height: 108px;
    }
}
.activity-list {
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}
.activity-row {
    display: grid;
    gap: 2px;
    padding: 9px 12px;
    color: inherit;
    border-top: 1px solid var(--border);
    background: #fff;
}
.activity-row:first-child {
    border-top: 0;
}
.activity-row:hover {
    background: #fcfdff;
    text-decoration: none;
}
.activity-user {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.activity-user strong {
    font-size: .93rem;
}
.activity-roles,
.activity-row time {
    color: var(--muted);
    font-size: .86rem;
}
.activity-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: .78rem;
    font-weight: 800;
    line-height: 1.2;
    border: 1px solid transparent;
    white-space: nowrap;
}
.activity-status-active {
    color: #087443;
    background: #e7f8ef;
    border-color: #b7e7cb;
}
.activity-status-recent {
    color: #9a5b00;
    background: #fff4d6;
    border-color: #f5d27a;
}
.activity-status-inactive {
    color: #475467;
    background: #f2f4f7;
    border-color: #d0d5dd;
}
.maintenance-activity-hint {
    margin-top: 10px;
}
.compact-page-head {
    display: grid;
    gap: 14px;
}
.inline-filter {
    display: grid;
    gap: 8px;
}
.inline-filter label {
    margin-top: 0;
}
.admin-log-filter {
    display: grid;
    gap: 10px;
}
.admin-log-filter label {
    margin-top: 0;
}
.admin-log-list {
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}
.admin-log-row {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 14px;
    padding: 12px 14px;
    border-top: 1px solid var(--border);
    background: #fff;
}
.admin-log-row:first-child {
    border-top: 0;
}
.admin-log-time time {
    color: var(--muted);
    font-size: .88rem;
}
.admin-log-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}
.admin-log-main span {
    color: var(--muted);
    font-size: .88rem;
}
.admin-log-details {
    margin-top: 6px;
}
.admin-log-details summary {
    color: var(--muted);
    cursor: pointer;
    font-size: .86rem;
    font-weight: 700;
}
.admin-log-details pre {
    max-height: 260px;
    overflow: auto;
    margin: 8px 0 0;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8fafc;
    color: var(--muted);
    font-size: .82rem;
    white-space: pre-wrap;
}
.compact-list {
    gap: 8px;
}
.compact-list .item {
    padding: 10px 12px;
}
.key-safe-pin-display {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0;
    margin: 8px 0 12px;
}
.fuel-table-visible {
    display: block;
    overflow-x: auto;
}
@media (min-width: 760px) {
    .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .vehicle-record-head {
        grid-template-columns: 164px minmax(0, 1fr);
        align-items: start;
    }
    .vehicle-record-section-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .user-filter-bar {
        grid-template-columns: minmax(260px, 1.3fr) minmax(190px, .8fr) minmax(190px, .8fr);
        align-items: end;
    }
    .role-checks {
        columns: 2;
    }
    .activity-row {
        grid-template-columns: minmax(180px, 240px) minmax(160px, 1fr) auto auto;
        align-items: center;
        gap: 14px;
    }
    .activity-row time {
        white-space: nowrap;
        text-align: right;
    }
    .compact-page-head {
        grid-template-columns: minmax(260px, 1fr) auto;
        align-items: end;
    }
    .inline-filter {
        grid-template-columns: 150px 110px auto;
        align-items: end;
    }
    .inline-filter.user-activity-filter {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
    .admin-log-filter {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        align-items: end;
    }
    .admin-log-filter button,
    .user-activity-filter button {
        justify-self: start;
    }
}
@media (max-width: 759px) {
    .back-to-top {
        right: calc(14px + env(safe-area-inset-right));
        bottom: calc(16px + env(safe-area-inset-bottom));
        width: 42px;
        height: 42px;
    }
    .admin-log-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .user-table {
        min-width: 0;
    }
    .user-table thead {
        display: none;
    }
    .user-table,
    .user-table tbody,
    .user-table tr,
    .user-table td {
        display: block;
        width: 100%;
    }
    .user-table tr {
        border: 1px solid var(--border);
        border-radius: 14px;
        padding: 10px 12px;
        margin-bottom: 10px;
        background: #fff;
    }
    .user-table td {
        border-bottom: 0;
        padding: 5px 0;
    }
    .user-table td::before {
        content: attr(data-label);
        display: block;
        color: var(--muted);
        font-size: .78rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0;
        margin-bottom: 1px;
    }
    .user-table td:first-child::before {
        display: none;
    }
}
@media (min-width: 760px) {
    .movement-hero {
        grid-template-columns: minmax(260px, 1fr) auto;
        align-items: end;
    }
    .movement-month-picker {
        grid-template-columns: auto minmax(150px, 190px) 120px auto;
        align-items: end;
    }
    .month-filter.inline-filter {
        grid-template-columns: auto 150px 110px auto;
    }
    .movement-desktop-table-wrap {
        display: block;
    }
    .movement-desktop-table .inline-details {
        position: relative;
    }
    .movement-desktop-table .inline-details form {
        position: absolute;
        z-index: 20;
        top: calc(100% + 8px);
        right: 0;
        box-shadow: var(--shadow);
    }
    .movement-mobile-cards {
        display: none;
    }
    .movement-status-panel .list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .movement-status-panel .item {
        padding: 10px 12px;
    }
    .movement-review-grid > form {
        display: flex;
        flex-direction: column;
    }
    .movement-reject-form {
        justify-content: flex-end;
    }
}
@media (min-width: 1100px) {
    .movement-status-panel .list,
    .movement-vehicle-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (min-width: 1100px) {
    .movement-summary {
        grid-template-columns: repeat(8, minmax(0, 1fr));
    }
    .fuel-summary-row .movement-summary {
        grid-template-columns: repeat(4, minmax(112px, 1fr));
    }
}
@media (max-width: 900px) {
    .fuel-summary-row {
        grid-template-columns: 1fr;
    }
    .fuel-summary-row .movement-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .month-lock-card {
        min-width: 0;
    }
}
@media (min-width: 760px) {
    .topbar {
        display: grid;
        grid-template-columns: 1fr minmax(260px, 380px) 1fr;
        align-items: center;
    }
    .desktop-header-search {
        display: flex;
        justify-self: center;
        width: 100%;
    }
    .nav-desktop {
        justify-self: end;
    }
    .nav-no-role-access {
        grid-column: 3;
    }
    .nav-desktop {
        overflow: visible;
    }
    .help-flow { grid-template-columns: repeat(3, 1fr); }
    .help-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 759px) {
    .movement-vehicle-grid {
        grid-template-columns: 1fr;
    }
    .movement-vehicle-card {
        grid-template-columns: 86px minmax(0, 1fr);
        gap: 10px;
        padding: 10px;
    }
    .vehicle-photo-button {
        width: 86px;
        height: 66px;
    }
    .vehicle-photo-button-table,
    .vehicle-photo-button-card {
        width: 72px;
        height: 56px;
    }
    .vehicle-photo-button-record {
        width: 120px;
        height: 90px;
    }
    .vehicle-inline-summary,
    .movement-card-vehicle {
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 9px;
    }
    .movement-status-popover {
        width: min(320px, calc(100vw - 24px));
        max-width: calc(100vw - 24px);
    }
    .vehicle-lightbox {
        padding: 12px;
    }
    .vehicle-lightbox-dialog {
        padding: 12px;
        border-radius: 14px;
    }
    .vehicle-photo-admin-field,
    .vehicle-admin-item {
        grid-template-columns: 1fr;
    }
    .vehicle-admin-item > img {
        width: 112px;
        height: 82px;
    }
    .vehicle-admin-item .item-actions {
        justify-content: flex-start;
    }
    .fuel-compare-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
    .fuel-compare-heading span {
        white-space: normal;
    }
    .fuel-compare-labels {
        display: none;
    }
    .fuel-compare-row {
        grid-template-columns: 1fr;
    }
    .fuel-compare-cell {
        border-right: 0 !important;
    }
    .fuel-compare-cell:first-child::before,
    .fuel-compare-cell:nth-child(2)::before {
        display: block;
        margin-bottom: 4px;
        color: var(--muted);
        font-size: .72rem;
        font-weight: 800;
        letter-spacing: 0;
        text-transform: uppercase;
    }
    .fuel-compare-cell:first-child::before {
        content: "Tankmeldung";
    }
    .fuel-compare-cell:nth-child(2)::before {
        content: "Rechnungsposition";
    }
    .fuel-compare-cell + .fuel-compare-cell {
        border-top: 1px solid var(--border);
    }
.fuel-compare-row + .fuel-compare-row {
        border-top: 6px solid #f3f5f8;
    }
}

@media (min-width: 760px) {
    .person-deadlines-filter {
        grid-template-columns: minmax(150px, 180px) minmax(260px, 360px) auto;
        align-items: end;
    }
}

.confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, .36);
}
.confirm-overlay[hidden] {
    display: none;
}
.confirm-dialog {
    width: min(100%, 460px);
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow);
}
.confirm-dialog h2 {
    margin: 0 0 10px;
}
.confirm-dialog p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.45;
}
.confirm-dialog .actions {
    justify-content: flex-end;
}

.person-deadlines-matrix-wrap {
    overflow-x: auto;
    max-width: 100%;
}

.person-deadlines-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 18px;
    margin-top: 14px;
}

.person-deadlines-tabs {
    margin: 0;
}

.person-deadlines-tabs .backup-tab.is-active {
    border-color: #f1b8c1;
    background: var(--soft);
    color: var(--primary-dark);
}

.person-deadlines-generate {
    align-items: center;
    gap: 6px;
    margin: 0;
}

.person-deadlines-filter {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, max-content));
    align-items: end;
    column-gap: 18px;
    row-gap: 12px;
    margin-bottom: 16px;
}

.person-deadlines-filter > div {
    display: grid;
    gap: 5px;
}

.person-deadlines-filter select {
    min-width: 160px;
}

.person-deadlines-filter input[type="search"] {
    min-width: 210px;
}

.person-deadlines-filter .person-deadlines-role-filter select {
    min-width: 280px;
}

.person-deadlines-filter button {
    justify-self: start;
    width: auto;
}

.person-deadlines-filter.is-js-enhanced .person-deadlines-filter-submit {
    display: none;
}

.person-deadlines-matrix {
    min-width: 820px;
}

.person-deadlines-matrix th,
.person-deadlines-matrix td {
    vertical-align: top;
}

.person-deadlines-matrix td:nth-child(1) {
    width: 280px;
    min-width: 250px;
}

.person-deadline-row-excluded {
    background: #f8fafc;
}

.person-deadline-row-excluded .person-deadline-compact-cell {
    opacity: .76;
}

.person-deadline-user-block {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.person-deadline-user-cell {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
}

.person-deadline-user-cell strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.person-deadline-info-icons {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
}

.person-deadline-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    min-width: 22px;
    padding: 0;
    border: 1px solid #d0d5dd;
    border-radius: 999px;
    background: #f8fafc;
    color: #475467;
    cursor: help;
}

.person-deadline-info-icon:hover,
.person-deadline-info-icon:focus {
    background: #eef1f5;
    outline: 2px solid rgba(176, 0, 32, .14);
}

.person-deadline-icon-svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.person-deadline-info-warning {
    border-color: #fedf89;
    background: #fffaeb;
    color: #b54708;
}

.person-deadline-exclusion-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.person-deadline-exclusion-badge {
    width: fit-content;
}

.person-deadline-exclusion-info {
    border-color: #fedf89;
    background: #fffaeb;
    color: #b54708;
}

.person-deadline-exclusion-icon-form,
.person-deadline-exclusion-details {
    display: inline-flex;
    flex: 0 0 auto;
    position: relative;
    max-width: 100%;
}

.person-deadline-exclusion-details summary {
    list-style: none;
}

.person-deadline-exclusion-details summary::-webkit-details-marker {
    display: none;
}

.person-deadline-exclusion-toggle {
    cursor: pointer;
}

.person-deadline-ignore-icon {
    position: relative;
    display: inline-flex;
}

.person-deadline-ignore-icon::after {
    content: "";
    position: absolute;
    left: 1px;
    right: 1px;
    top: 50%;
    border-top: 2px solid currentColor;
    transform: rotate(-35deg);
    transform-origin: center;
}

.person-deadline-exclusion-panel {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    left: 0;
    width: min(280px, calc(100vw - 32px));
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow);
}

.person-deadline-exclusion-reason {
    width: 100%;
    min-width: 0;
    padding: 8px 10px;
    font-size: .86rem;
}

.person-deadline-exclusion-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.person-deadline-exclusion-note {
    color: #b54708;
    font-weight: 700;
}

.person-deadline-note-icon {
    color: #344054;
}

.person-deadline-warning-symbol {
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 13px solid currentColor;
    position: relative;
}

.person-deadline-warning-symbol::after {
    content: "!";
    position: absolute;
    left: -2px;
    top: 3px;
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
}

.person-deadline-compact-cell {
    display: grid;
    gap: 6px;
    min-width: 160px;
    max-width: 220px;
}

.person-deadline-cell-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.person-deadline-cell-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.person-deadline-cell-meta {
    display: grid;
    gap: 2px;
    color: var(--muted);
    font-size: .84rem;
    line-height: 1.32;
    white-space: normal;
}

.person-deadline-cell-meta strong {
    color: var(--text);
    font-weight: 750;
}

.person-deadline-edit-button,
.person-deadline-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    padding: 0;
    border-radius: 10px;
    background: #eef1f5;
    color: var(--text);
    border: 1px solid transparent;
}

.person-deadline-edit-button:hover,
.person-deadline-modal-close:hover {
    background: #e3e7ee;
}

.person-deadline-edit-icon {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.person-deadline-floating-tooltip {
    position: fixed;
    z-index: 1200;
    width: max-content;
    max-width: min(360px, calc(100vw - 24px));
    max-height: min(280px, calc(100vh - 24px));
    overflow-y: auto;
    padding: 10px 12px;
    border: 1px solid #111827;
    border-radius: 12px;
    background: #111827;
    color: #fff;
    box-shadow: var(--shadow);
    font-size: .88rem;
    font-weight: 500;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
}

.person-deadline-floating-tooltip[hidden] {
    display: none;
}

.person-deadline-floating-tooltip div + div {
    margin-top: 6px;
}

.person-deadline-floating-tooltip strong {
    color: #fff;
    font-weight: 850;
}

.person-deadline-excluded-separator td {
    padding-top: 18px;
    background: #fff;
    border-top: 2px solid #e4e7ec;
    color: var(--muted);
}

.person-deadline-excluded-separator strong,
.person-deadline-mobile-separator strong {
    display: block;
    color: var(--text);
    font-size: .95rem;
}

.person-deadline-excluded-separator span,
.person-deadline-mobile-separator span {
    display: block;
    margin-top: 3px;
    font-size: .86rem;
}

.person-deadlines-mobile-list {
    display: none;
}

.person-deadline-mobile-card {
    border: 1px solid #d0d5dd;
    border-left: 4px solid var(--primary);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .08);
    overflow: hidden;
}

.person-deadline-mobile-card + .person-deadline-mobile-card {
    margin-top: 16px;
}

.person-deadline-mobile-card header,
.person-deadline-mobile-deadline h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.person-deadline-mobile-card header {
    padding: 12px 14px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
}

.person-deadline-mobile-card.person-deadline-row-excluded {
    border-left-color: #b54708;
}

.person-deadline-mobile-separator {
    margin: 18px 0 10px;
    padding-top: 14px;
    border-top: 2px solid #e4e7ec;
    color: var(--muted);
}

.person-deadline-mobile-deadlines {
    display: grid;
    gap: 10px;
    padding: 12px 14px 14px;
}

.person-deadline-mobile-deadline {
    border-top: 1px solid var(--border);
    padding-top: 10px;
}

.person-deadline-mobile-deadline h3 {
    display: block;
    margin: 0 0 8px;
    font-size: .95rem;
}

.person-deadline-modal[hidden] {
    display: none;
}

.person-deadline-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: grid;
    place-items: center;
    padding: 20px;
}

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

.person-deadline-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
    max-height: min(90vh, 720px);
    overflow: auto;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow);
}

.person-deadline-modal-dialog h2 {
    margin-right: 44px;
}

.person-deadline-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
}

.person-deadline-modal-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0 16px;
}

.person-deadline-modal-meta div {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8fafc;
}

.person-deadline-modal-meta span {
    display: block;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

.person-deadline-modal textarea {
    min-height: 110px;
}

.person-deadline-note-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.person-deadline-note-label label {
    margin-bottom: 0;
}

.person-deadline-note-label span {
    color: var(--muted);
    font-size: .84rem;
    font-weight: 800;
}

.person-deadline-modal-change {
    margin-top: 8px;
}

.person-deadline-import-card {
    display: grid;
    gap: 16px;
}

.person-deadline-import-upload,
.person-deadline-import-mapping,
.person-deadline-import-apply {
    display: grid;
    gap: 12px;
}

.person-deadline-import-preview {
    display: grid;
    gap: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.person-deadline-import-map-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 12px;
}

.person-deadline-import-summary {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
    font-weight: 750;
}

.person-deadline-import-table {
    min-width: 980px;
}

.person-deadline-import-table th,
.person-deadline-import-table td {
    vertical-align: top;
}

.person-deadline-import-table select {
    width: 100%;
    min-width: 150px;
    margin-bottom: 6px;
}

.person-deadline-import-hints {
    margin: 6px 0 0;
    padding-left: 18px;
    color: var(--muted);
}

.person-deadline-import-decision-controls {
    display: grid;
    gap: 4px;
}

.person-deadline-import-decision-controls.is-ignored [data-import-target-select] {
    opacity: 0.62;
}

.person-deadline-import-decision-note {
    color: var(--muted);
}

.person-deadline-import-row-apply {
    background: #f6fef9;
}

.person-deadline-import-row-review {
    background: #fffbeb;
}

.person-deadline-import-row-ambiguous,
.person-deadline-import-row-not_found,
.person-deadline-import-row-not_applicable {
    background: #fff7ed;
}

.person-deadline-import-row-no_change {
    background: #f8fafc;
}

body.modal-open {
    overflow: hidden;
}

/* Wissensdatenbank */
.knowledge-page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}
.knowledge-page-head h1 {
    margin-bottom: 6px;
}
.knowledge-page-head .actions {
    margin-top: 0;
    justify-content: flex-end;
}
.knowledge-title-field {
    min-width: 0;
}
.knowledge-title-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.knowledge-title-help.help-tip.mini {
    margin-left: 0;
}
.knowledge-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: end;
}
.knowledge-title-row input[readonly] {
    background: #f8fafc;
    color: #344054;
}
.knowledge-title-change-notice {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid #e3e8ef;
    border-radius: 8px;
    background: #f8fafc;
    color: #344054;
}
.knowledge-title-change-notice p {
    margin: 0 0 8px;
    font-size: .9rem;
}
.knowledge-title-change-notice .checkbox-line {
    margin: 0;
}
.knowledge-title-change-notice[hidden] {
    display: none;
}
.knowledge-category-badges,
.knowledge-category-cloud {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    vertical-align: middle;
}
.knowledge-category-badges a.badge,
.knowledge-category-cloud a.badge {
    text-decoration: none;
    border-color: rgba(176, 0, 32, .16);
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}
@media (hover: hover) and (pointer: fine) {
    .knowledge-category-badges a.badge:hover,
    .knowledge-category-cloud a.badge:hover {
        text-decoration: none;
        color: var(--primary-dark);
        background: #fff3f4;
        border-color: rgba(176, 0, 32, .28);
        box-shadow: 0 3px 10px rgba(15, 23, 42, .08);
        transform: translateY(-1px);
    }
}
.knowledge-category-badges a.badge:focus-visible,
.knowledge-category-cloud a.badge:focus-visible {
    outline: 3px solid rgba(176, 0, 32, .2);
    outline-offset: 2px;
    text-decoration: none;
}
.knowledge-category-cloud {
    display: flex;
}
.knowledge-home-list-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}
.knowledge-home-list-footer .small {
    margin: 0;
}
.knowledge-home-grid {
    align-items: start;
}
.knowledge-filter-grid {
    display: grid;
    grid-template-columns: minmax(260px, 2.3fr) minmax(180px, 1fr) minmax(145px, .75fr) auto;
    gap: 12px;
    align-items: end;
    margin-top: 18px;
}
.knowledge-filter-grid label {
    margin-top: 0;
}
.knowledge-filter-submit button {
    min-height: 42px;
    white-space: nowrap;
}
.knowledge-list .item-context {
    max-width: 70ch;
}
.knowledge-card-link {
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
@media (hover: hover) and (pointer: fine) {
    .knowledge-card-link:hover {
        border-color: #c7cfdb;
        background: #fcfcfd;
        box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
    }
}
.knowledge-card-link:focus-visible {
    outline: 3px solid rgba(176, 0, 32, .18);
    outline-offset: 2px;
}
.knowledge-article-actions-mobile {
    display: none;
    position: relative;
    z-index: 30;
}
.knowledge-action-menu-button {
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
    border-color: #d0d5dd;
    background: #f8fafc;
    color: #344054;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.knowledge-action-menu-button .button-icon {
    width: 21px;
    height: 21px;
}
.knowledge-action-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 60;
    display: grid;
    gap: 6px;
    min-width: 210px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .16);
}
.knowledge-action-menu[hidden] {
    display: none;
}
.knowledge-action-menu a,
.knowledge-action-menu form,
.knowledge-action-menu button {
    width: 100%;
}
.knowledge-action-menu form {
    margin: 0;
}
.knowledge-action-menu a,
.knowledge-action-menu button {
    justify-content: flex-start;
    min-height: 42px;
}
.knowledge-card-link .item-title-text {
    color: var(--text);
    text-decoration: none;
    transition: color .16s ease;
}
.knowledge-card-link .item-title-text:hover,
.knowledge-card-link .item-title-text:focus,
.knowledge-card-link:hover .item-title-text {
    color: var(--primary-dark);
    text-decoration: none;
}
.knowledge-card-link .item-title-text:focus-visible {
    outline: 3px solid rgba(176, 0, 32, .18);
    outline-offset: 2px;
    border-radius: 4px;
}
.knowledge-content {
    margin-top: 18px;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
}
.knowledge-lock-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-left: 4px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    vertical-align: middle;
}
.knowledge-lock-icon .button-icon {
    width: 14px;
    height: 14px;
}
.knowledge-article-back {
    margin: 0 0 10px;
}
.knowledge-article {
    overflow: visible;
}
.knowledge-content h2,
.knowledge-content h3,
.knowledge-content h4 {
    margin: 1.4em 0 .45em;
    line-height: 1.2;
}
.knowledge-content h2,
.knowledge-editor-surface h2 {
    padding-bottom: .28em;
    border-bottom: 1px solid #d9e0e8;
}
.knowledge-content p,
.knowledge-content ul,
.knowledge-content ol,
.knowledge-content blockquote,
.knowledge-content pre {
    margin: 0 0 1em;
}
.knowledge-content blockquote {
    padding: 10px 14px;
    border-left: 4px solid var(--border);
    background: #f8fafc;
    color: #344054;
}
.knowledge-content pre {
    overflow-x: auto;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
}
.knowledge-content code {
    padding: 1px 4px;
    border-radius: 5px;
    background: #f1f3f7;
}
.knowledge-content img,
.knowledge-editor-surface img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 0 1em;
    border: 0;
    border-radius: 6px;
    background: transparent;
}
.knowledge-content [data-align="center"],
.knowledge-editor-surface [data-align="center"] {
    text-align: center;
}
.knowledge-content [data-align="right"],
.knowledge-editor-surface [data-align="right"] {
    text-align: right;
}
.knowledge-content img[data-align="center"],
.knowledge-editor-surface img[data-align="center"] {
    margin-right: auto;
    margin-left: auto;
}
.knowledge-content img[data-align="right"],
.knowledge-editor-surface img[data-align="right"] {
    margin-left: auto;
}
.knowledge-content img[data-size="25"],
.knowledge-editor-surface img[data-size="25"] {
    width: 25%;
}
.knowledge-content img[data-size="50"],
.knowledge-editor-surface img[data-size="50"] {
    width: 50%;
}
.knowledge-content img[data-size="75"],
.knowledge-editor-surface img[data-size="75"] {
    width: 75%;
}
.knowledge-content img[data-size="100"],
.knowledge-editor-surface img[data-size="100"] {
    width: 100%;
}
.knowledge-editor-surface img.is-selected {
    outline: 3px solid rgba(176, 0, 32, .22);
    outline-offset: 2px;
}
.knowledge-editor-surface a[data-media-id][data-file-kind] {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    width: 100%;
    margin: 0 0 1em;
    padding: 12px 14px;
    border: 1px solid #d6dee8;
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .06);
}
.knowledge-editor-surface a[data-media-id][data-file-kind]::before {
    content: attr(data-file-kind);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    min-height: 34px;
    padding: 4px 8px;
    border-radius: 6px;
    background: #eef2f7;
    color: #2f3d50;
    font-size: .76rem;
    font-weight: 800;
    text-transform: uppercase;
}
.knowledge-attachment-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    width: 100%;
    margin: 0 0 1em;
    padding: 14px;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
}
.knowledge-attachment-badge,
.knowledge-file-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    min-height: 38px;
    padding: 6px 9px;
    border-radius: 7px;
    background: #eef2f7;
    color: #29384a;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .02em;
}
.knowledge-attachment-badge-pdf,
.knowledge-file-badge-pdf {
    background: #fff1f2;
    color: #9f1239;
}
.knowledge-attachment-badge-doc,
.knowledge-attachment-badge-docx,
.knowledge-file-badge-doc,
.knowledge-file-badge-docx {
    background: #eff6ff;
    color: #1d4ed8;
}
.knowledge-attachment-badge-xlsx,
.knowledge-file-badge-xlsx {
    background: #ecfdf5;
    color: #047857;
}
.knowledge-attachment-body {
    display: grid;
    gap: 3px;
    min-width: 0;
}
.knowledge-attachment-body strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.knowledge-attachment-meta {
    overflow: hidden;
    color: var(--muted);
    font-size: .86rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.knowledge-attachment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
.knowledge-attachment-actions a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid #cfd6df;
    border-radius: 6px;
    background: #f8fafc;
    color: #263548;
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
}
.knowledge-table-scroll {
    max-width: 100%;
    margin: 0 0 1em;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}
.knowledge-content table,
.knowledge-editor-surface table {
    width: 100%;
    min-width: 520px;
    margin: 0 0 1em;
    border-collapse: collapse;
    border: 1px solid #ccd5df;
    background: #fff;
    font-size: .94rem;
    table-layout: auto;
}
@supports selector(table:has(col[data-width])) {
    .knowledge-content table:has(col[data-width]),
    .knowledge-editor-surface table:has(col[data-width]) {
        table-layout: fixed;
    }
}
.knowledge-content col[data-width="10"],
.knowledge-editor-surface col[data-width="10"] {
    width: 10%;
}
.knowledge-content col[data-width="15"],
.knowledge-editor-surface col[data-width="15"] {
    width: 15%;
}
.knowledge-content col[data-width="20"],
.knowledge-editor-surface col[data-width="20"] {
    width: 20%;
}
.knowledge-content col[data-width="25"],
.knowledge-editor-surface col[data-width="25"] {
    width: 25%;
}
.knowledge-content col[data-width="30"],
.knowledge-editor-surface col[data-width="30"] {
    width: 30%;
}
.knowledge-content col[data-width="35"],
.knowledge-editor-surface col[data-width="35"] {
    width: 35%;
}
.knowledge-content col[data-width="40"],
.knowledge-editor-surface col[data-width="40"] {
    width: 40%;
}
.knowledge-content col[data-width="45"],
.knowledge-editor-surface col[data-width="45"] {
    width: 45%;
}
.knowledge-content col[data-width="50"],
.knowledge-editor-surface col[data-width="50"] {
    width: 50%;
}
.knowledge-table-scroll table {
    margin-bottom: 0;
}
.knowledge-content caption,
.knowledge-editor-surface caption {
    padding: 8px 10px;
    color: var(--muted);
    text-align: left;
    font-size: .9rem;
}
.knowledge-content th,
.knowledge-content td,
.knowledge-editor-surface th,
.knowledge-editor-surface td {
    min-width: 110px;
    padding: 9px 11px;
    border: 1px solid #d9e0e8;
    text-align: left;
    vertical-align: top;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
    white-space: normal;
}
.knowledge-content td img:not([data-size]),
.knowledge-content th img:not([data-size]),
.knowledge-editor-surface td img:not([data-size]),
.knowledge-editor-surface th img:not([data-size]) {
    width: auto;
}
.knowledge-content td img,
.knowledge-content th img,
.knowledge-editor-surface td img,
.knowledge-editor-surface th img {
    max-width: 100%;
    max-width: min(100%, 180px);
    max-height: 180px;
    margin: 0 auto;
    object-fit: contain;
}
@supports selector(td:has(img)) {
    .knowledge-content td:has(img),
    .knowledge-content th:has(img),
    .knowledge-editor-surface td:has(img),
    .knowledge-editor-surface th:has(img) {
        width: 1%;
        min-width: 82px;
        padding: 6px 8px;
        text-align: center;
        vertical-align: middle;
    }
    .knowledge-content td p:has(img),
    .knowledge-content th p:has(img),
    .knowledge-editor-surface td p:has(img),
    .knowledge-editor-surface th p:has(img) {
        margin-bottom: .35em;
    }
    .knowledge-content td p:has(img):last-child,
    .knowledge-content th p:has(img):last-child,
    .knowledge-editor-surface td p:has(img):last-child,
    .knowledge-editor-surface th p:has(img):last-child {
        margin-bottom: 0;
    }
}
.knowledge-content th,
.knowledge-editor-surface th {
    background: #f2f5f8;
    color: #263548;
    font-weight: 700;
}
.knowledge-content tbody tr:nth-child(even) td {
    background: #fbfcfd;
}
.knowledge-editor-surface {
    overflow-x: auto;
}
.knowledge-editor-surface th:focus,
.knowledge-editor-surface td:focus {
    outline: 2px solid rgba(176, 0, 32, .22);
    outline-offset: -2px;
}
.knowledge-article-footer {
    margin-top: 24px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: .88rem;
}
.knowledge-editor {
    border: 1px solid #cfd6df;
    border-radius: 12px;
    overflow: visible;
    background: #f4f7fa;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .75);
}
.knowledge-editor-bars {
    position: sticky;
    top: calc(env(safe-area-inset-top) + 78px);
    z-index: 6;
    border-bottom: 1px solid var(--border);
    border-radius: 11px 11px 0 0;
    background: rgba(243, 246, 249, .98);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}
.knowledge-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 8px;
    background: transparent;
}
.knowledge-toolbar-group {
    display: inline-flex;
    flex: 0 0 auto;
    gap: 3px;
    align-items: center;
    padding: 2px;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    background: rgba(255, 255, 255, .72);
}
.knowledge-editor-bars button {
    min-width: 36px;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid #cfd6df;
    border-radius: 6px;
    background: #fff;
    color: #263548;
    font-size: .9rem;
    box-shadow: none;
    touch-action: manipulation;
}
.knowledge-editor-bars button:hover,
.knowledge-editor-bars button:focus {
    border-color: #b7c1cd;
    background: #f8fafc;
}
.knowledge-editor-bars button:focus-visible {
    outline: 3px solid rgba(176, 0, 32, .18);
    outline-offset: 2px;
}
.knowledge-editor-bars button.is-active {
    border-color: #aeb9c7;
    background: #edf2f7;
    color: #182536;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .05);
}
.knowledge-editor-bars button:disabled,
.knowledge-editor-bars button.knowledge-editor-button-disabled {
    border-color: #d9dee6;
    background: #eef2f6;
    color: #98a2b3;
    cursor: not-allowed;
    opacity: .72;
}
.knowledge-editor-bars button:disabled:hover,
.knowledge-editor-bars button.knowledge-editor-button-disabled:hover {
    border-color: #d9dee6;
    background: #eef2f6;
}
.knowledge-editor-bars select {
    min-height: 34px;
    padding: 6px 28px 6px 10px;
    border: 1px solid #cfd6df;
    border-radius: 6px;
    background-color: #fff;
    color: #263548;
    font-size: .9rem;
}
.knowledge-editor-bars select:focus {
    border-color: #b7c1cd;
    outline: 3px solid rgba(176, 0, 32, .18);
    outline-offset: 2px;
}
.knowledge-toolbar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    min-width: 38px;
    padding: 6px;
}
.knowledge-toolbar-icon .button-icon {
    width: 19px;
    height: 19px;
}
.knowledge-table-tools {
    border-left: 3px solid #9fb2c8;
}
.knowledge-table-tools[hidden] {
    display: none;
}
.knowledge-toolbar-context {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 7px 8px 8px;
    border-top: 1px solid #dfe6ee;
    background: rgba(250, 252, 254, .96);
}
.knowledge-toolbar-context-label {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    color: #42526a;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .01em;
}
.knowledge-toolbar-context-label.subtle {
    color: var(--muted);
    font-weight: 600;
}
.knowledge-toolbar-context-section {
    display: inline-flex;
    flex: 0 0 auto;
    gap: 6px;
    align-items: center;
}
.knowledge-table-dialog {
    padding: 10px;
    border-bottom: 1px solid var(--border);
    background: #fff;
}
.knowledge-table-dialog[hidden] {
    display: none;
}
.knowledge-table-dialog-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 160px)) minmax(180px, 1fr) auto;
    gap: 10px;
    align-items: end;
}
.knowledge-table-dialog label {
    margin: 0;
}
.knowledge-table-dialog input[type="number"] {
    min-height: 38px;
}
.knowledge-table-head-checkbox {
    align-self: center;
    margin-bottom: 7px;
}
.knowledge-table-dialog-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.knowledge-image-tools {
    border-left: 3px solid #aab7c8;
}
.knowledge-image-tools[hidden] {
    display: none;
}
.knowledge-image-modal[hidden] {
    display: none;
}
.knowledge-file-modal[hidden] {
    display: none;
}
.knowledge-image-modal {
    position: fixed;
    inset: 0;
    z-index: 160;
}
.knowledge-file-modal {
    position: fixed;
    inset: 0;
    z-index: 160;
}
.knowledge-image-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 170;
    width: min(960px, calc(100vw - 28px));
    max-height: min(760px, calc(100vh - 36px));
    overflow: auto;
    transform: translate(-50%, -50%);
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .24);
}
.knowledge-image-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
}
.knowledge-image-tabs button.is-active {
    border-color: var(--primary);
    background: #fff5f6;
    color: var(--primary-dark);
}
.knowledge-image-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 14px;
}
.knowledge-image-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #d9e0e8;
    border-radius: 8px;
    background: #fff;
    transition: border-color .16s ease, box-shadow .16s ease;
}
.knowledge-file-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-top: 14px;
}
.knowledge-file-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: flex-start;
    min-width: 0;
    padding: 14px;
    border: 1px solid #d9e0e8;
    border-radius: 8px;
    background: #fff;
    transition: border-color .16s ease, box-shadow .16s ease;
}
.knowledge-file-card .knowledge-image-card-body {
    align-self: stretch;
}
.knowledge-file-card label,
.knowledge-file-card input {
    width: 100%;
}
.knowledge-file-card button {
    align-self: end;
    width: 100%;
}
.knowledge-file-card:focus-within,
.knowledge-file-card:hover {
    border-color: #c5cfda;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
}
.knowledge-image-card:focus-within,
.knowledge-image-card:hover {
    border-color: #c5cfda;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
}
.knowledge-image-card-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    background: #f4f7fa;
}
.knowledge-image-card-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.knowledge-image-card-body {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 12px;
}
.knowledge-image-card-body strong,
.knowledge-image-filename {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.knowledge-image-filename {
    margin: -3px 0 0;
    color: var(--muted);
    font-size: .82rem;
}
.knowledge-image-card-body .small {
    margin: 0;
    color: var(--muted);
    line-height: 1.35;
}
.knowledge-image-card-body label {
    margin: 0;
    font-size: .84rem;
}
.knowledge-image-card-body input {
    margin-top: 4px;
}
.knowledge-image-card-body button {
    width: 100%;
    justify-content: center;
}
.knowledge-image-import-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}
.knowledge-image-import-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid #e0e6ee;
    border-radius: 8px;
    background: #f8fafc;
}
.knowledge-editor-surface {
    min-height: 320px;
    padding: 18px;
    margin: 14px 10px 10px;
    border: 1px solid #cfd6df;
    border-radius: 9px;
    background: #fff;
    outline: none;
    cursor: text;
    line-height: 1.55;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .04);
}
.knowledge-editor-surface:focus {
    border-color: #d85d74;
    box-shadow: 0 0 0 3px rgba(176, 0, 32, .12);
}
.knowledge-editor-surface.is-empty::before {
    content: attr(data-placeholder);
    color: var(--muted);
    pointer-events: none;
}
.knowledge-organization-panel {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}
.knowledge-organization-head {
    display: grid;
    gap: 4px;
}
.knowledge-organization-head h2 {
    margin: 0;
}
.knowledge-organization-head .small {
    margin: 0;
}
.knowledge-subsection h3 {
    margin: 0;
}
.knowledge-subcard {
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    padding: 20px;
    border: 1px solid #e0e6ee;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .045);
}
.knowledge-subcard-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 1px solid #f1bec7;
    border-radius: 13px;
    background: #fff5f7;
    color: var(--primary);
}
.knowledge-subcard-icon .button-icon {
    width: 25px;
    height: 25px;
}
.knowledge-subcard-body {
    min-width: 0;
}
.knowledge-subcard-head {
    margin-bottom: 14px;
}
.knowledge-subcard-head .small {
    margin: 5px 0 0;
}
.knowledge-subsection + .knowledge-subsection {
    margin-top: 0;
}
.knowledge-picker {
    position: relative;
    display: grid;
    gap: 10px;
}
.knowledge-picker input[type="search"],
.knowledge-inline-add input {
    max-width: 420px;
}
.knowledge-picker-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 38px;
    align-items: center;
}
.knowledge-picker-selected:empty::before {
    content: "Noch nichts ausgewählt";
    color: var(--muted);
    font-size: .88rem;
}
.knowledge-picker-chip {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    max-width: 100%;
    min-height: 34px;
    padding: 6px 8px 6px 11px;
    border: 1px solid #d9e0e8;
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    font-size: .9rem;
    font-weight: 650;
}
.knowledge-picker-chip span {
    min-width: 0;
    overflow-wrap: break-word;
}
.knowledge-picker-chip button {
    width: 22px;
    height: 22px;
    min-height: 22px;
    padding: 0;
    border-radius: 999px;
    background: #eef1f5;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1;
}
.knowledge-picker-chip button:hover {
    background: #e2e6ec;
    color: var(--text);
}
.knowledge-picker-chip-pending {
    border-style: dashed;
    background: #f8fafc;
}
.knowledge-picker-results {
    display: none;
    flex-wrap: wrap;
    gap: 7px;
    max-height: 180px;
    overflow: auto;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
}
.knowledge-picker.is-open .knowledge-picker-results:not([hidden]) {
    display: flex;
}
.knowledge-picker-results[hidden] {
    display: none;
}
.knowledge-picker-results button {
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #f8fafc;
    color: var(--text);
    font-size: .88rem;
    text-align: left;
}
.knowledge-picker-results button:hover,
.knowledge-picker-results button:focus {
    border-color: #d4dce6;
    background: #fff;
}
.knowledge-picker-results button[hidden] {
    display: none;
}
.knowledge-picker-empty {
    margin: 0;
    color: var(--muted);
}
.knowledge-picker-empty[hidden] {
    display: none;
}
.knowledge-inline-add {
    margin-top: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fbfcfe;
}
.knowledge-alias-add-row {
    display: grid;
    gap: 10px;
    margin-bottom: 10px;
}
.knowledge-alias-chip-row {
    margin-top: 10px;
}
.knowledge-inline-add[hidden] {
    display: none;
}
.knowledge-inline-add-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    align-items: end;
}
.knowledge-new-category {
    margin-top: 12px;
}
.knowledge-new-category-note {
    margin: 10px 0 0;
}
.knowledge-new-category .knowledge-inline-add input,
.knowledge-new-category .knowledge-inline-add textarea {
    max-width: 420px;
}
.knowledge-new-category .knowledge-inline-add textarea {
    min-height: 82px;
    resize: vertical;
}
.knowledge-new-category-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.knowledge-new-category-message {
    margin: 8px 0 0;
}
.knowledge-new-category-message[hidden] {
    display: none;
}
.knowledge-access-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 14px;
}
.knowledge-access-grid-single {
    grid-template-columns: minmax(0, 1fr);
}
.knowledge-access-options[hidden] {
    display: none;
}
.knowledge-access-master {
    align-items: flex-start;
    display: inline-flex;
    max-width: max-content;
    padding: 10px 12px;
    border: 1px solid #e0e6ee;
    border-radius: 12px;
    background: #fbfcfe;
    font-weight: 700;
}
.knowledge-access-card {
    min-width: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
}
.knowledge-access-card h4 {
    margin: 0;
}
.knowledge-access-active-note {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #bfd4f5;
    border-radius: 12px;
    background: #f5f9ff;
    color: #1d4e89;
}
.knowledge-access-active-note strong {
    display: block;
    margin-bottom: 4px;
}
.knowledge-access-active-note p {
    margin: 0;
    color: #344054;
    font-size: .9rem;
    line-height: 1.45;
}
.knowledge-access-row {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) auto;
    gap: 14px;
    align-items: center;
    min-height: 48px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}
.knowledge-access-row:last-child {
    border-bottom: 0;
}
.knowledge-access-row strong {
    min-width: 0;
    line-height: 1.25;
    overflow-wrap: break-word;
    word-break: normal;
}
.knowledge-access-allow {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 0;
    color: var(--text);
    font-size: .88rem;
    font-weight: 600;
    white-space: nowrap;
}
.knowledge-access-allow input {
    flex: 0 0 auto;
    margin: 0;
}
.knowledge-access-notice {
    margin: 14px 0 18px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 10px;
    background: #fbfcfe;
}
.knowledge-access-notice p {
    margin: 4px 0 10px;
    color: var(--muted);
    font-size: .9rem;
}
.knowledge-access-notice dl {
    display: grid;
    gap: 6px;
    margin: 0;
}
.knowledge-access-notice dl div {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 10px;
}
.knowledge-access-notice dt {
    color: var(--muted);
    font-size: .86rem;
    font-weight: 650;
}
.knowledge-access-notice dd {
    margin: 0;
    overflow-wrap: break-word;
    word-break: normal;
}
.knowledge-change-note-card {
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    margin-top: 16px;
    padding: 18px 20px;
    border: 1px solid #e0e6ee;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}
.knowledge-change-note-card .small {
    margin: 6px 0 0;
}
.knowledge-editor-actions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e3e8ef;
}
.knowledge-article .button-icon {
    stroke-linecap: round;
    stroke-linejoin: round;
}
.knowledge-category-tools {
    max-width: 420px;
    margin-bottom: 14px;
}
.knowledge-category-list {
    display: grid;
    gap: 8px;
}
.knowledge-category-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
}
.knowledge-category-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}
.knowledge-category-main span {
    color: var(--muted);
    font-size: .9rem;
    overflow-wrap: anywhere;
}
.knowledge-category-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}
.knowledge-category-actions {
    display: flex;
    justify-content: flex-end;
}
.knowledge-category-edit form {
    margin-top: 18px;
}
.knowledge-version-item summary {
    cursor: pointer;
}
.knowledge-version-content {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.knowledge-link-modal[hidden] {
    display: none;
}
.knowledge-link-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 18px;
}
.knowledge-link-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    background: rgba(15, 23, 42, .46);
    box-shadow: none;
    cursor: default;
}
.knowledge-link-backdrop:hover,
.knowledge-link-backdrop:focus,
.knowledge-link-backdrop:active {
    border: 0;
    background: rgba(15, 23, 42, .46);
    box-shadow: none;
    outline: none;
}
.knowledge-link-dialog {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    max-height: calc(100dvh - 36px);
    overflow: auto;
    padding: 18px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}
.knowledge-link-dialog h2 {
    margin-top: 0;
}
.knowledge-link-dialog label {
    margin-top: 10px;
}
.knowledge-link-dialog input[type="url"],
.knowledge-link-dialog input[type="search"] {
    width: 100%;
    max-width: none;
}
.knowledge-link-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 999px;
    background: #eef1f5;
    color: var(--text);
}
.knowledge-link-type {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0 14px;
}
.knowledge-link-type label {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    margin: 0;
}
.knowledge-link-results {
    display: grid;
    gap: 6px;
    margin-top: 10px;
}
.knowledge-link-actions {
    gap: 8px;
}
.knowledge-link-actions .danger-soft {
    border-color: #f4b6c0;
    color: var(--primary-dark);
}
.knowledge-link-result {
    justify-content: flex-start;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    text-align: left;
}

@media (max-width: 768px) {
    .knowledge-page-head,
    .knowledge-page-head .actions {
        align-items: stretch;
        flex-direction: column;
    }
    .knowledge-title-row {
        grid-template-columns: 1fr;
    }
    .knowledge-page-head .actions,
    .knowledge-editor-form .actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }
    .knowledge-page-head .actions .button,
    .knowledge-page-head .actions button,
    .knowledge-editor-form .actions .button,
    .knowledge-editor-form .actions button {
        width: 100%;
    }
    .knowledge-article .knowledge-page-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        gap: 10px;
    }
    .knowledge-article .knowledge-page-head > div:first-child {
        min-width: 0;
    }
    .knowledge-article .knowledge-article-actions-desktop {
        display: none;
    }
    .knowledge-article-actions-mobile {
        display: block;
        justify-self: end;
    }
    .knowledge-article-actions-mobile .knowledge-action-menu-button {
        width: 42px;
    }
    .knowledge-action-menu {
        max-width: calc(100vw - 28px);
    }
    .knowledge-action-menu .button,
    .knowledge-action-menu button {
        width: 100%;
    }
    .knowledge-filter-grid {
        grid-template-columns: 1fr;
    }
    .knowledge-filter-submit button {
        width: 100%;
    }
    .knowledge-organization-panel {
        gap: 12px;
    }
    .knowledge-subcard,
    .knowledge-change-note-card {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
    }
    .knowledge-subcard-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }
    .knowledge-picker input[type="search"],
    .knowledge-inline-add input,
    .knowledge-new-category .knowledge-inline-add input,
    .knowledge-new-category .knowledge-inline-add textarea {
        max-width: none;
    }
    .knowledge-access-grid {
        grid-template-columns: 1fr;
    }
    .knowledge-access-card-head {
        grid-template-columns: 1fr;
    }
    .knowledge-access-row {
        grid-template-columns: 1fr;
    }
    .knowledge-access-allow {
        justify-content: flex-start;
        white-space: normal;
    }
    .knowledge-access-notice dl div {
        grid-template-columns: 1fr;
        gap: 2px;
    }
    .knowledge-category-row {
        grid-template-columns: 1fr;
    }
    .knowledge-category-meta,
    .knowledge-category-actions {
        justify-content: flex-start;
    }
    .knowledge-editor-bars {
        top: calc(env(safe-area-inset-top) + 62px);
    }
    .knowledge-editor-toolbar,
    .knowledge-toolbar-context {
        align-items: stretch;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }
    .knowledge-editor-bars button,
    .knowledge-editor-bars select,
    .knowledge-toolbar-group,
    .knowledge-toolbar-context-section {
        flex: 0 0 auto;
    }
    .knowledge-toolbar-divider {
        display: none;
    }
    .knowledge-table-dialog-grid {
        grid-template-columns: 1fr;
    }
    .knowledge-table-dialog-actions {
        justify-content: stretch;
    }
    .knowledge-table-dialog-actions button {
        flex: 1 1 auto;
    }
    .knowledge-image-dialog {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 24px);
        padding: 16px;
    }
    .knowledge-image-card {
        display: flex;
    }
    .knowledge-image-results,
    .knowledge-file-results {
        grid-template-columns: 1fr;
    }
    .knowledge-attachment-card {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .knowledge-attachment-actions {
        justify-content: flex-start;
    }
    .knowledge-attachment-actions a {
        justify-content: center;
        width: 100%;
    }
    .knowledge-editor-surface a[data-media-id][data-file-kind] {
        grid-template-columns: 1fr;
    }
    .knowledge-file-card {
        grid-template-columns: 1fr;
    }
    .knowledge-image-import-list div {
        align-items: flex-start;
        flex-direction: column;
    }
    .knowledge-content img[data-size],
    .knowledge-editor-surface img[data-size] {
        width: 100%;
    }
    .knowledge-inline-add-row {
        grid-template-columns: 1fr;
    }
    .completion-option-date {
        max-width: none;
        padding-left: 0;
    }
    .completion-options-box {
        padding: 10px;
    }
    .completion-option-admin-head,
    .completion-option-admin-grid {
        grid-template-columns: 1fr;
    }
    .person-deadlines-toolbar,
    .person-deadlines-generate {
        align-items: stretch;
        flex-direction: column;
    }
    .person-deadlines-generate button,
    .person-deadlines-filter select,
    .person-deadlines-filter .person-deadlines-role-filter select {
        width: 100%;
        min-width: 0;
    }
    .person-deadlines-matrix-wrap {
        display: none;
    }
    .person-deadlines-mobile-list {
        display: block;
    }
    .person-deadline-compact-cell {
        max-width: none;
    }
    .person-deadline-modal {
        align-items: end;
        padding: 12px;
    }
    .person-deadline-modal-dialog {
        width: 100%;
        max-height: calc(100vh - 24px);
        padding: 18px;
        border-radius: 18px;
    }
    .person-deadline-modal-meta {
        grid-template-columns: 1fr;
    }
    .person-deadline-modal .actions {
        display: grid;
        grid-template-columns: 1fr;
    }
    .person-deadline-modal .actions button {
        width: 100%;
        min-height: 44px;
    }
    .person-deadline-import-map-grid {
        grid-template-columns: 1fr;
    }
    .person-deadline-import-table-wrap {
        overflow-x: auto;
    }
    .confirm-overlay {
        align-items: end;
        padding: 12px;
    }
    .confirm-dialog {
        border-radius: 18px;
        padding: 18px;
    }
    .confirm-dialog .actions {
        display: grid;
        grid-template-columns: 1fr;
    }
    .confirm-dialog .actions button {
        width: 100%;
    }
}

.my-tasks-hero {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: space-between;
}

.my-tasks-hero > div:first-child {
    max-width: 680px;
    min-width: 0;
}

.my-tasks-hero .actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: flex-end;
}

.my-tasks-hero .button,
.my-tasks-hero button {
    white-space: nowrap;
}

.my-tasks-filter {
    align-items: end;
    grid-template-columns:
        minmax(120px, .65fr)
        minmax(180px, 1fr)
        minmax(150px, .8fr)
        minmax(190px, 1fr)
        minmax(250px, 1.35fr)
        auto;
}

.my-tasks-filter label {
    color: #344054;
    font-size: .9rem;
    line-height: 1.25;
    margin-top: 0;
}

.my-tasks-filter input,
.my-tasks-filter select {
    min-width: 0;
    width: 100%;
}

.my-tasks-filter-search {
    min-width: 0;
}

.my-tasks-filter-actions {
    align-items: end;
    display: flex;
}

.my-tasks-list-head {
    align-items: baseline;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.my-tasks-list {
    display: grid;
    gap: 10px;
}

.my-task-row {
    align-items: start;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: inherit;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 14px;
    text-decoration: none;
}

.my-task-row:hover {
    border-color: #c8d1df;
    box-shadow: 0 8px 22px rgba(16, 24, 40, .06);
    text-decoration: none;
}

.my-task-row:hover .item-title-text,
.my-task-row:hover .item-meta,
.my-task-row:hover .context-description {
    text-decoration: none;
}

.my-task-row.is-highlighted {
    background: #f8fbff;
    border-color: #c8d1df;
    box-shadow: 0 0 0 1px rgba(53, 56, 205, .08);
}

.my-task-main {
    min-width: 0;
}

.my-task-description {
    line-height: 1.5;
    margin-top: 10px;
}

.my-task-description.is-collapsed {
    max-height: 7.5em;
    overflow: hidden;
}

.description-toggle-button {
    appearance: none;
    background: transparent;
    border: 0;
    color: var(--primary);
    cursor: pointer;
    font: inherit;
    font-size: .88rem;
    font-weight: 750;
    margin: 6px 0 0;
    padding: 0;
    text-align: left;
}

.description-toggle-button:hover,
.description-toggle-button:focus-visible {
    background: transparent;
    box-shadow: none;
    color: var(--primary-dark);
    text-decoration: underline;
}

.description-toggle-button:focus-visible {
    outline: 2px solid rgba(176, 0, 32, .28);
    outline-offset: 3px;
    border-radius: 4px;
}

.description-toggle-button:active {
    background: transparent;
    box-shadow: none;
    color: var(--primary-dark);
}

.my-task-actions {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

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

.my-task-actions button:not(.secondary),
.my-task-actions .button:not(.secondary) {
    color: #fff;
}

.my-task-actions .button-icon {
    color: currentColor;
}

.additional-task-target-grid [hidden] {
    display: none;
}

.dashboard-subheading {
    color: var(--muted);
    font-size: .95rem;
    margin: 14px 0 8px;
}

.dashboard-personal-task-list {
    margin-top: 6px;
}

.personal-task-privacy-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid #d7dde6;
    border-radius: 999px;
    background: #f8fafc;
    color: #667085;
    flex: 0 0 auto;
}

.personal-task-privacy-icon {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.personal-task-form-card,
.my-tasks-filter-card,
.my-tasks-list-card {
    margin-top: 14px;
}

.additional-task-form .form-grid,
.personal-task-form .form-grid {
    margin-top: 8px;
}

@media (max-width: 900px) {
    .my-tasks-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .my-tasks-hero .actions {
        justify-content: stretch;
    }

    .my-tasks-hero .actions .button,
    .my-tasks-hero .actions button {
        flex: 1 1 auto;
    }

    .my-tasks-filter {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }

    .my-tasks-filter-search,
    .my-tasks-filter-actions {
        grid-column: 1 / -1;
    }

    .my-tasks-filter-actions button {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .my-tasks-hero .actions {
        flex-direction: column;
    }

    .my-tasks-filter {
        grid-template-columns: 1fr;
    }

    .my-tasks-filter label {
        font-size: .95rem;
        margin-bottom: 7px;
    }

    .my-task-row {
        grid-template-columns: 1fr;
    }

    .my-task-actions {
        justify-content: stretch;
    }

    .my-task-actions form,
    .my-task-actions .button,
    .my-task-actions button {
        width: 100%;
    }
}
