.haushalt-admin .haushalt-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.haushalt-toolbar-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.haushalt-toolbar-export {
    margin-left: auto;
    padding-left: 16px;
    border-left: 2px solid #dcdcde;
}

.haushalt-toolbar-export-label,
.haushalt-summary-export-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #646970;
    white-space: nowrap;
}

.haushalt-export-btn-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    height: 40px;
    box-sizing: border-box;
}

.haushalt-export-icon {
    flex-shrink: 0;
    color: #cc0000;
}

.haushalt-export-label {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.haushalt-btn-export,
button.haushalt-btn-export,
a.haushalt-btn-export {
    background: linear-gradient(180deg, #fff 0%, #f8f8f8 100%);
    border: 2px solid #cc0000;
    color: #990000;
    box-shadow: 0 1px 3px rgba(204, 0, 0, 0.12);
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.haushalt-btn-export:hover,
button.haushalt-btn-export:hover,
a.haushalt-btn-export:hover {
    background: #cc0000;
    border-color: #cc0000;
    color: #fff;
    box-shadow: 0 3px 8px rgba(153, 0, 0, 0.24);
}

.haushalt-btn-export:hover .haushalt-export-icon,
button.haushalt-btn-export:hover .haushalt-export-icon,
a.haushalt-btn-export:hover .haushalt-export-icon {
    color: #fff;
}

.haushalt-export-btn-compact .haushalt-export-btn-inner {
    height: auto;
    padding: 6px 12px;
    gap: 6px;
}

.haushalt-export-btn-compact .haushalt-export-label {
    font-size: 13px;
}

.haushalt-export-btn-compact .haushalt-export-icon {
    width: 16px;
    height: 16px;
}

.haushalt-admin .haushalt-form-panel {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 16px 20px;
    margin-bottom: 24px;
    max-width: 700px;
}

.haushalt-summary-cards {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.haushalt-card {
    background: #f5f5f5;
    border: 1px solid #dcdcde;
    border-left: 4px solid #cc0000;
    border-radius: 4px;
    padding: 16px 24px;
    min-width: 180px;
}

.haushalt-card-label {
    display: block;
    font-size: 12px;
    color: #646970;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.haushalt-card-value {
    display: block;
    font-size: 22px;
    font-weight: 600;
    color: #1d2327;
}

.haushalt-card-highlight {
    background: #fff8f8;
    border-left-color: #cc0000;
    box-shadow: 0 2px 8px rgba(204, 0, 0, 0.08);
}

.haushalt-card-highlight .haushalt-card-value {
    color: #990000;
    font-size: 24px;
}

.haushalt-card-value.haushalt-negative,
.haushalt-negative {
    color: #d63638;
}

.haushalt-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.haushalt-status-badge.haushalt-status-icon:not(.haushalt-padlock-badge) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    min-width: 0;
    line-height: 0;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.haushalt-status-entwurf,
.haushalt-status-badge.entwurf {
    background: #edfaef;
    color: #1e7e34;
    border: 1px solid #a8cdb5;
}

.haushalt-status-gesperrt,
.haushalt-status-badge.gesperrt {
    background: #f0f0f1;
    color: #1d2327;
    border: 1px solid #cc0000;
}

.haushalt-status-keine {
    background: #f0f0f1;
    color: #646970;
}

/* Padlock-Status: roter/grüner Kreis */
.haushalt-padlock-badge.haushalt-status-badge.haushalt-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0 !important;
    line-height: 0;
    border-radius: 50%;
    border: 3px solid #cc0000 !important;
    background: #fff !important;
    color: #1d2327;
    box-shadow: none !important;
    box-sizing: border-box;
    vertical-align: middle;
}

.haushalt-padlock-badge.haushalt-status-badge.haushalt-status-icon.haushalt-padlock-badge--unlocked {
    border-color: #1e7e34 !important;
}

.haushalt-padlock-badge .haushalt-status-icon-svg,
.haushalt-padlock-badge .haushalt-padlock-icon {
    width: 30px;
    height: 30px;
}

button.haushalt-unlock-anmeldung.haushalt-padlock-badge {
    cursor: pointer;
    font: inherit;
}

button.haushalt-unlock-anmeldung.haushalt-padlock-badge:hover {
    background: #f6fff8 !important;
}

button.haushalt-unlock-anmeldung.haushalt-padlock-badge:focus {
    outline: 2px solid #1e7e34;
    outline-offset: 2px;
}

.haushalt-col-anmeldung-status,
.haushalt-col-overview-actions {
    text-align: center;
}

.haushalt-konten-list {
    margin: 0;
    padding-left: 16px;
    font-size: 12px;
}

.haushalt-konten-list li {
    margin-bottom: 2px;
}

.haushalt-inactive {
    opacity: 0.5;
}

.haushalt-info {
    color: #646970;
    font-style: italic;
}

.haushalt-total-row td {
    background: #f6f7f7;
}

/* Aufklappbare Tabellenzeilen */
.haushalt-col-toggle {
    width: 36px;
    text-align: center;
}

.haushalt-row-toggle {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    color: #1d2327;
}

.haushalt-row-toggle:hover {
    background: #f0f0f1;
    border-color: #cc0000;
    color: #990000;
}

.haushalt-overview-row.haushalt-expandable {
    cursor: pointer;
}

.haushalt-overview-row.is-expanded td {
    background: #f9f9f9;
}

.haushalt-detail-row td {
    padding: 0 !important;
    background: #fafafa;
    border-top: none !important;
}

.haushalt-detail-content {
    padding: 16px 20px 20px 48px;
}

.haushalt-detail-content .haushalt-konto-block {
    padding: 0;
}

.haushalt-detail-content .haushalt-genehmigung-table {
    margin: 0 0 12px !important;
}

.haushalt-konto-block {
    margin-bottom: 20px;
}

.haushalt-konto-block:last-child {
    margin-bottom: 0;
}

.haushalt-konto-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.haushalt-konto-block-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
    flex: 1 1 auto;
}

.haushalt-konto-block-header .haushalt-approve-konto-all {
    flex-shrink: 0;
}

.haushalt-konto-block-summe {
    font-weight: 700;
    color: #646970;
}

.haushalt-accordion-empty {
    color: #646970;
    font-style: italic;
    margin: 0;
}

@media (max-width: 782px) {
    .haushalt-accordion-header {
        flex-wrap: wrap;
    }

    .haushalt-accordion-stats {
        width: 100%;
        margin-left: 22px;
    }
}

.haushalt-card-value.haushalt-stat-genehmigt {
    color: #1e7e34;
}

.haushalt-card-value.haushalt-stat-abgelehnt {
    color: #1d2327;
}

.haushalt-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.haushalt-admin .haushalt-data-table,
.haushalt-admin .haushalt-genehmigung-table {
    width: 100%;
}

.haushalt-genehmigung-panel {
    background: #fff;
    border: 1px solid #cc0000;
    border-radius: 4px;
    margin-bottom: 24px;
    padding: 0 0 12px;
    overflow: visible;
}

.haushalt-genehmigung-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 20px;
    border-bottom: 1px solid #cc0000;
    background: #f5f5f5;
}

.haushalt-genehmigung-header.haushalt-panel-accordion-header {
    cursor: pointer;
}

.haushalt-genehmigung-header.haushalt-panel-accordion-header.is-expanded {
    background: #f9f9f9;
}

.haushalt-panel-toggle {
    flex: 0 0 auto;
    margin-top: 2px;
}

.haushalt-genehmigung-panel.is-expanded {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.haushalt-genehmigung-panel-body {
    padding-bottom: 4px;
}

.haushalt-genehmigung-panel:not(.is-expanded) .haushalt-genehmigung-header {
    border-bottom: none;
}

.haushalt-genehmigung-header-info {
    flex: 1 1 240px;
    min-width: 0;
}

.haushalt-genehmigung-header h2 {
    margin: 0 0 4px;
    font-size: 18px;
}

.haushalt-phase-lock-controls {
    flex: 0 0 auto;
    text-align: right;
}

.haushalt-panel-export {
    flex: 0 0 auto;
    margin-left: auto;
}

.haushalt-export-pdf {
    white-space: nowrap;
}

.haushalt-phase-locked-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    background: #f0f0f1;
    color: #990000;
    border: 1px solid #cc0000;
    font-size: 12px;
    font-weight: 500;
}

.haushalt-phase-locked-note {
    display: inline-block;
    font-size: 12px;
    color: #646970;
    max-width: 180px;
    line-height: 1.4;
}

.haushalt-genehmigung-meta {
    color: #646970;
    font-size: 13px;
}

.haushalt-genehmigung-konto {
    margin: 16px 20px 8px;
    font-size: 14px;
}

.haushalt-genehmigung-panel .haushalt-konto-block {
    padding: 0 0 4px;
}

.haushalt-genehmigung-panel .haushalt-konto-block-header {
    padding: 0 20px;
}

.haushalt-genehmigung-panel .haushalt-table-wrap {
    padding: 0 20px 12px;
    scrollbar-gutter: stable;
}

.haushalt-genehmigung-panel .haushalt-genehmigung-table {
    margin: 0 !important;
    overflow: visible;
}

.haushalt-genehmigung-table.haushalt-position-table th.haushalt-col-actions {
    white-space: normal;
    line-height: 1.3;
}

.haushalt-genehmigung-table th,
.haushalt-genehmigung-table td {
    padding: 8px 12px;
    vertical-align: top;
}

.haushalt-genehmigung-table.haushalt-position-table th:first-child,
.haushalt-genehmigung-table.haushalt-position-table td:first-child {
    padding-left: 14px;
}

.haushalt-genehmigung-table.haushalt-position-table th:last-child,
.haushalt-genehmigung-table.haushalt-position-table td:last-child {
    padding-right: 14px;
}

.haushalt-konto-overview-panel {
    margin-bottom: 20px;
}

.haushalt-konto-overview-panel .haushalt-genehmigung-panel-body {
    padding: 0 20px 16px;
}

.haushalt-konto-overview-table .haushalt-col-einheit {
    white-space: normal;
    vertical-align: top;
}

.haushalt-konto-overview-table .haushalt-col-einheit .haushalt-genehmigung-meta {
    display: block;
    margin-top: 4px;
}

.haushalt-modal {
    position: fixed;
    inset: 0;
    z-index: 100100;
}

.haushalt-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.haushalt-modal-dialog {
    position: relative;
    max-width: 720px;
    width: calc(100% - 32px);
    margin: 10vh auto 0;
    background: #fff;
    border: 1px solid #cc0000;
    border-radius: 6px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.haushalt-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid #cc0000;
    background: #f5f5f5;
}

.haushalt-modal-header h3 {
    margin: 0;
    font-size: 16px;
}

.haushalt-modal-header .haushalt-modal-close {
    border: none;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #646970;
    padding: 0;
}

.haushalt-modal-body {
    padding: 20px 22px;
    max-height: 60vh;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.65;
    font-size: 14px;
    background: #fafafa;
}

.haushalt-modal-footer {
    padding: 12px 18px 16px;
    text-align: right;
    border-top: 1px solid #dcdcde;
}

.haushalt-genehmigung-table .haushalt-col-actions .haushalt-genehmigung-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: flex-start;
}

.haushalt-phase-pending-note {
    color: #646970;
}

.haushalt-status-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-height: 28px;
}

.haushalt-genehmigung-badge {
    display: inline-block;
    flex: 0 0 auto;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.haushalt-genehmigung-offen {
    background: #f0f0f1;
    color: #646970;
}

.haushalt-genehmigung-genehmigt {
    background: #edfaef;
    color: #1e7e34;
}

.haushalt-genehmigung-abgelehnt {
    background: #f0f0f1;
    color: #990000;
    border: 1px solid #cc0000;
}

.haushalt-genehmigung-table .haushalt-col-actions .haushalt-genehmigung-actions .button {
    margin-bottom: 0;
    white-space: nowrap;
}

.haushalt-bemerkung-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    padding: 0 !important;
    margin: 0;
    border: 1px solid #dcdcde !important;
    border-radius: 50%;
    background: #fff !important;
    color: #646970 !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1 !important;
    box-shadow: none !important;
    position: relative;
    z-index: 2;
}

.haushalt-bemerkung-info:hover {
    border-color: #c3c4c7 !important;
    background: #f5f5f5 !important;
    color: #1d2327 !important;
}

.haushalt-fahrzeug-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.haushalt-fahrzeug-status-geplant {
    background: #f0f6fc;
    color: #2271b1;
    border: 1px solid #c5d9ed;
}

.haushalt-fahrzeug-status-freigegeben {
    background: #edfaef;
    color: #1e7e34;
    border: 1px solid #a8cdb5;
}

.haushalt-fahrzeug-status-bestellt {
    background: #fcf9e8;
    color: #8a6d1d;
    border: 1px solid #e6d8a8;
}

.haushalt-fahrzeug-status-geliefert {
    background: #f0f0f1;
    color: #1d2327;
    border: 1px solid #c3c4c7;
}

.haushalt-fahrzeug-form-table textarea {
    width: 100%;
    max-width: 520px;
}

/* Fahrzeuge – Zeitstrahl & Modal */
.haushalt-admin-fahrzeuge,
.haushalt-fahrzeuge-timeline-section {
    position: relative;
}

.haushalt-fahrzeuge-timeline-section {
    margin: 24px 0 28px;
    padding: 20px 20px 24px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-left: 4px solid #cc0000;
    border-radius: 8px;
}

.haushalt-fahrzeuge-timeline-header h3 {
    margin: 0 0 6px;
    font-size: 16px;
}

.haushalt-fahrzeuge-timeline-header .haushalt-hint {
    margin: 0 0 16px;
}

.haushalt-fahrzeuge-timeline-header .haushalt-timeline-scroll-hint {
    margin: -8px 0 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #646970;
}

.haushalt-fahrzeuge-timeline-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.haushalt-fahrzeuge-timeline-title-row h3 {
    margin: 0;
}

.haushalt-timeline-view-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: #f0f0f1;
    border-radius: 8px;
    border: 1px solid #dcdcde;
}

.haushalt-timeline-view-tab {
    margin: 0;
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #646970;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.haushalt-timeline-view-tab:hover {
    color: #1d2327;
}

.haushalt-timeline-view-tab.active {
    background: #fff;
    color: #1d2327;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.haushalt-timeline-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
    padding: 14px 16px;
    background: #fafafa;
    border: 1px solid #e8e8ea;
    border-radius: 8px;
}

.haushalt-timeline-filter-panel {
    min-width: 0;
}

.haushalt-timeline-filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.haushalt-timeline-filter-head h4 {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #646970;
}

.haushalt-timeline-filter-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.haushalt-timeline-filter-actions .button-link {
    padding: 0;
    border: none;
    background: none;
    color: #2271b1;
    cursor: pointer;
    font-size: 12px;
    text-decoration: none;
}

.haushalt-timeline-filter-actions .button-link:hover {
    color: #cc0000;
}

.haushalt-timeline-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 120px;
    overflow-y: auto;
    padding-right: 4px;
}

.haushalt-timeline-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 6px 10px;
    border: 1px solid #dcdcde;
    border-radius: 999px;
    background: #fff;
    font-size: 12px;
    color: #1d2327;
    cursor: pointer;
    user-select: none;
}

.haushalt-timeline-filter-chip.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.haushalt-timeline-filter-chip input {
    margin: 0;
    flex-shrink: 0;
}

.haushalt-timeline-filter-chip em {
    font-style: normal;
    color: #646970;
    font-size: 11px;
}

.haushalt-timeline-filter-empty {
    color: #c3c4c7;
    font-size: 13px;
}

.haushalt-timeline-view-panel {
    display: none;
}

.haushalt-timeline-view-panel.active {
    display: block;
}

.haushalt-fahrzeuge-timeline-matrix {
    overflow: auto;
    max-height: 520px;
    padding-bottom: 10px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    background: #fff;
}

.haushalt-timeline-matrix-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: none;
    border-radius: 0;
    background: #fff;
}

.haushalt-timeline-matrix-table th,
.haushalt-timeline-matrix-table td {
    border-right: 1px solid #e8e8ea;
    border-bottom: 1px solid #e8e8ea;
    vertical-align: top;
    padding: 0;
    background-clip: padding-box;
}

.haushalt-timeline-matrix-table tr:last-child th,
.haushalt-timeline-matrix-table tr:last-child td {
    border-bottom: none;
}

.haushalt-timeline-matrix-table th:last-child,
.haushalt-timeline-matrix-table td:last-child {
    border-right: none;
}

.haushalt-timeline-matrix-sticky-col {
    position: -webkit-sticky;
    position: sticky;
    left: 0;
    z-index: 2;
    width: 180px;
    min-width: 180px;
    max-width: 180px;
    background: #f5f5f5;
    box-shadow: 4px 0 8px rgba(0, 0, 0, 0.08);
}

.haushalt-timeline-matrix-table thead th {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 10px 8px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    background: #f5f5f5;
    min-width: 132px;
}

.haushalt-timeline-matrix-table thead .haushalt-timeline-matrix-sticky-col {
    left: 0;
    top: 0;
    z-index: 5;
    text-align: left;
    padding-left: 14px;
    background: #f5f5f5;
}

.haushalt-timeline-matrix-table tbody .haushalt-timeline-matrix-sticky-col {
    left: 0;
    background: #f5f5f5;
}

.haushalt-timeline-matrix-year.is-current,
.haushalt-timeline-matrix-cell.is-current {
    background: #fff5f5;
}

.haushalt-timeline-matrix-year.is-current {
    color: #cc0000;
    box-shadow: inset 0 -2px 0 #cc0000;
}

.haushalt-timeline-matrix-row-label {
    padding: 12px 14px;
    text-align: left;
}

.haushalt-timeline-matrix-einheit-name {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #1d2327;
    line-height: 1.3;
}

.haushalt-timeline-matrix-cell {
    padding: 8px;
    min-width: 132px;
    background: #fafafa;
    vertical-align: top;
}

.haushalt-timeline-matrix-cell-inner {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 100%;
}

.haushalt-timeline-matrix-cell-blocks {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.haushalt-timeline-mittel-tile {
    margin-top: 0;
    padding: 8px 10px;
    border-radius: 8px;
    border: 2px solid #2271b1;
    text-align: center;
    background: linear-gradient(180deg, #fff 0%, #f0f6fc 100%);
    box-shadow: 0 1px 4px rgba(34, 113, 177, 0.12);
}

.haushalt-timeline-cell-sum-tile,
.haushalt-timeline-row-sum-tile {
    margin-top: auto;
    padding: 8px 10px;
    border-radius: 8px;
    background: linear-gradient(180deg, #fff 0%, #f6f7f7 100%);
    border: 2px solid #cc0000;
    text-align: center;
    box-shadow: 0 1px 4px rgba(204, 0, 0, 0.1);
}

.haushalt-timeline-row-sum-tile {
    margin-top: 8px;
    border-color: #dcdcde;
    background: #fff;
    box-shadow: none;
}

.haushalt-timeline-matrix-row-label .haushalt-timeline-row-sum-tile {
    border-color: #c3c4c7;
}

.haushalt-timeline-matrix-footer-label .haushalt-timeline-row-sum-tile {
    border-color: #cc0000;
    background: #fff8f8;
}

.haushalt-timeline-cell-sum-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #646970;
    margin-bottom: 3px;
}

.haushalt-timeline-cell-sum-value {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #990000;
    line-height: 1.2;
}

.haushalt-timeline-mittel-sum-value {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #135e96;
    line-height: 1.2;
}

.haushalt-timeline-matrix-cell.is-current .haushalt-timeline-cell-sum-tile {
    background: linear-gradient(180deg, #fffafa 0%, #fff5f5 100%);
}

.haushalt-timeline-matrix-cell.is-current .haushalt-timeline-mittel-tile {
    background: linear-gradient(180deg, #f8fbff 0%, #edf5ff 100%);
}

.haushalt-timeline-matrix-cell .haushalt-timeline-block {
    margin-bottom: 6px;
}

.haushalt-timeline-matrix-cell .haushalt-timeline-block:last-child {
    margin-bottom: 0;
}

.haushalt-timeline-matrix-empty {
    display: block;
    text-align: center;
    color: #c3c4c7;
    padding: 16px 0;
    font-size: 14px;
}

.haushalt-timeline-matrix-table tfoot th,
.haushalt-timeline-matrix-table tfoot td {
    background: #eef0f2;
    border-top: 2px solid #dcdcde;
    font-weight: 700;
}

.haushalt-timeline-matrix-footer-label .haushalt-timeline-matrix-einheit-name {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #646970;
}

.haushalt-timeline-matrix-footer-cell {
    padding: 12px 8px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #1d2327;
    background: #eef0f2;
}

.haushalt-timeline-matrix-footer-cell.is-current {
    background: #fff0f0;
    color: #990000;
}

.haushalt-timeline-years-footer {
    display: flex;
    flex-direction: row;
    width: max-content;
    min-width: 100%;
    border: 1px solid #dcdcde;
    border-top: none;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    background: #eef0f2;
}

.haushalt-timeline-years-footer-cell {
    flex: 0 0 132px;
    width: 132px;
    min-width: 132px;
    padding: 10px 8px;
    text-align: center;
    border-right: 1px solid #e8e8ea;
    background: #eef0f2;
}

.haushalt-timeline-years-footer-cell:last-child {
    border-right: none;
}

.haushalt-timeline-years-footer-cell.is-current {
    background: #fff0f0;
}

.haushalt-timeline-years-footer-year {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #646970;
    margin-bottom: 2px;
}

.haushalt-timeline-years-footer-cell strong {
    display: block;
    font-size: 13px;
    color: #1d2327;
}

.haushalt-timeline-years-footer-cell.is-current strong {
    color: #990000;
}

.haushalt-timeline-grand-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 12px;
    padding: 14px 18px;
    border: 2px solid #cc0000;
    border-radius: 8px;
    background: linear-gradient(180deg, #fffafa 0%, #fff 100%);
}

.haushalt-timeline-grand-total-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #646970;
}

.haushalt-timeline-grand-total-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #990000;
    line-height: 1.2;
}

.haushalt-timeline-grand-total-meta {
    font-size: 12px;
    color: #646970;
    white-space: nowrap;
}

.haushalt-fahrzeuge-timeline {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 10px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.haushalt-timeline-grid {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: max-content;
    min-width: 100%;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.haushalt-timeline-column {
    flex: 0 0 132px;
    width: 132px;
    min-width: 132px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e8e8ea;
}

.haushalt-timeline-column:last-child {
    border-right: none;
}

.haushalt-timeline-column-header {
    padding: 12px 10px;
    text-align: center;
    background: #f5f5f5;
    border-bottom: 2px solid #e8e8ea;
}

.haushalt-timeline-column.is-current .haushalt-timeline-column-header {
    background: #fff5f5;
    border-bottom-color: #cc0000;
}

.haushalt-timeline-year-label {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #1d2327;
}

.haushalt-timeline-year-note {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #cc0000;
}

.haushalt-timeline-column-total-label {
    display: block;
    margin-top: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #646970;
}

.haushalt-timeline-column-total {
    display: block;
    margin-top: 2px;
    font-size: 14px;
    font-weight: 700;
    color: #1d2327;
}

.haushalt-timeline-column-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    background: #fafafa;
    min-height: 120px;
}

.haushalt-timeline-column-footer {
    margin-top: auto;
    padding: 10px;
    border-top: 2px solid #e8e8ea;
    background: #eef0f2;
}

.haushalt-timeline-column.is-current .haushalt-timeline-column-footer {
    border-top-color: #cc0000;
    background: #fff0f0;
}

.haushalt-timeline-year-total {
    text-align: center;
    padding: 8px 6px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #dcdcde;
}

.haushalt-timeline-year-total--compact {
    padding: 6px 4px;
    background: transparent;
    border: none;
}

.haushalt-timeline-year-total-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #646970;
    margin-bottom: 3px;
}

.haushalt-timeline-year-total-value {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #1d2327;
    line-height: 1.2;
}

.haushalt-timeline-column.is-current .haushalt-timeline-year-total,
.haushalt-timeline-matrix-year.is-current .haushalt-timeline-year-total-value,
.haushalt-timeline-matrix-footer-cell.is-current .haushalt-timeline-year-total-value {
    color: #990000;
}

.haushalt-timeline-matrix-year-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
}

.haushalt-timeline-matrix-year .haushalt-timeline-year-total {
    background: rgba(255, 255, 255, 0.65);
}

.haushalt-timeline-column-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c3c4c7;
    font-size: 18px;
}

.haushalt-timeline-block {
    width: 100%;
    margin: 0;
    padding: 10px;
    border: none;
    border-radius: 6px;
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 12px;
    line-height: 1.35;
    color: #1d2327;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.haushalt-timeline-block:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.haushalt-timeline-block-title {
    font-size: 13px;
    font-weight: 700;
}

.haushalt-timeline-block-einheit,
.haushalt-timeline-block-typ,
.haushalt-timeline-block-status {
    color: #50575e;
    font-size: 11px;
}

.haushalt-timeline-block-summe {
    margin-top: 2px;
    font-weight: 700;
    font-size: 12px;
}

.haushalt-timeline-block.haushalt-fahrzeug-status-geplant {
    background: #e8f3fc;
    border-left: 4px solid #2271b1;
}

.haushalt-timeline-block.haushalt-fahrzeug-status-freigegeben {
    background: #e8f5e9;
    border-left: 4px solid #1e7e34;
}

.haushalt-timeline-block.haushalt-fahrzeug-status-bestellt {
    background: #fff8e5;
    border-left: 4px solid #8a6d1d;
}

.haushalt-timeline-block.haushalt-fahrzeug-status-geliefert {
    background: #f0f0f1;
    border-left: 4px solid #646970;
}

.haushalt-timeline-empty,
.haushalt-timeline-loading {
    margin: 16px 0 0;
    text-align: center;
    color: #646970;
    font-style: italic;
}

.haushalt-fahrzeug-add-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0 !important;
    margin: 0;
    border-radius: 6px;
    background: #cc0000 !important;
    border: 2px solid #cc0000 !important;
    color: #fff !important;
    cursor: pointer;
    box-sizing: border-box;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.haushalt-fahrzeug-add-btn:hover {
    background: #990000 !important;
    border-color: #990000 !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(153, 0, 0, 0.25);
}

.haushalt-fahrzeug-add-icon {
    display: block;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    pointer-events: none;
}

#haushalt-fahrzeug-modal.haushalt-modal {
    position: fixed;
    inset: 0;
    z-index: 100100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    margin: 0;
    width: 100%;
    max-width: none;
    min-height: 100vh;
}

#haushalt-fahrzeug-modal.haushalt-modal.is-open {
    display: flex;
}

#haushalt-fahrzeug-modal .haushalt-modal-dialog {
    margin: 0;
    width: min(680px, 100%);
}

.haushalt-fahrzeug-modal-dialog {
    position: relative;
    max-width: 680px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 40px);
    margin: 20px auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.haushalt-fahrzeug-modal-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #cc0000 0%, #e85c5c 100%);
    z-index: 2;
}

.haushalt-fahrzeug-modal-header {
    padding: 18px 22px 14px;
    border-bottom: 1px solid #ececec;
    background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
}

.haushalt-fahrzeug-modal-heading {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.haushalt-fahrzeug-modal-kicker {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #cc0000;
}

.haushalt-fahrzeug-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1d2327;
    line-height: 1.25;
}

.haushalt-fahrzeug-form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

.haushalt-fahrzeug-modal .haushalt-modal-body {
    white-space: normal;
    word-break: normal;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: none;
    background: #f3f4f5;
    padding: 0;
}

.haushalt-fahrzeug-form-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.haushalt-fahrzeug-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 200px;
    gap: 14px;
    align-items: start;
}

.haushalt-fahrzeug-form-primary {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.haushalt-fahrzeug-form-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.haushalt-fahrzeug-form-aside {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.haushalt-fahrzeug-sum-card {
    padding: 14px;
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.haushalt-fahrzeug-sum-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding: 8px 10px;
    border: 2px solid #cc0000;
    border-radius: 8px;
    background: #fff8f8;
}

.haushalt-fahrzeug-sum-input {
    flex: 1;
    min-width: 0;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    font-size: 22px !important;
    font-weight: 700;
    color: #1d2327;
    box-shadow: none !important;
}

.haushalt-fahrzeug-sum-currency {
    font-size: 18px;
    font-weight: 700;
    color: #cc0000;
}

.haushalt-fahrzeug-notes-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 10px;
}

.haushalt-fahrzeug-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
}

.haushalt-fahrzeug-field-hero {
    gap: 8px;
}

.haushalt-fahrzeug-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #646970;
}

.haushalt-fahrzeug-hero-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 18px;
    font-weight: 600;
    background: #fff;
    color: #1d2327;
}

.haushalt-fahrzeug-field input:not(.haushalt-fahrzeug-sum-input):not(.haushalt-fahrzeug-hero-input),
.haushalt-fahrzeug-field select,
.haushalt-fahrzeug-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 9px 11px;
    font-size: 14px;
    background: #fff;
    color: #1d2327;
}

.haushalt-fahrzeug-field textarea {
    resize: vertical;
    min-height: 64px;
    line-height: 1.45;
}

.haushalt-fahrzeug-status-select {
    font-weight: 600;
    border-left-width: 4px !important;
}

.haushalt-fahrzeug-status-select.haushalt-fahrzeug-status-geplant {
    border-left-color: #2271b1;
    background: #f4f9fd;
}

.haushalt-fahrzeug-status-select.haushalt-fahrzeug-status-freigegeben {
    border-left-color: #1e7e34;
    background: #f3faf4;
}

.haushalt-fahrzeug-status-select.haushalt-fahrzeug-status-bestellt {
    border-left-color: #8a6d1d;
    background: #fffbf0;
}

.haushalt-fahrzeug-status-select.haushalt-fahrzeug-status-geliefert {
    border-left-color: #646970;
    background: #f6f7f7;
}

.haushalt-fahrzeug-field input:focus,
.haushalt-fahrzeug-field select:focus,
.haushalt-fahrzeug-field textarea:focus,
.haushalt-fahrzeug-hero-input:focus {
    border-color: #cc0000;
    outline: none;
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.12);
}

.haushalt-fahrzeug-modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 14px 20px 16px;
    background: #fff;
    border-top: 1px solid #ececec;
}

.haushalt-fahrzeug-modal-footer .button {
    margin: 0;
    min-height: 38px;
    padding: 0 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

.haushalt-fahrzeug-save.button-primary {
    background: #cc0000;
    border-color: #cc0000;
    box-shadow: 0 2px 6px rgba(204, 0, 0, 0.25);
}

.haushalt-fahrzeug-save.button-primary:hover {
    background: #990000;
    border-color: #990000;
}

@media (max-width: 782px) {
    .haushalt-timeline-filters {
        grid-template-columns: 1fr;
    }

    .haushalt-fahrzeug-form-layout {
        grid-template-columns: 1fr;
    }

    .haushalt-fahrzeug-form-row {
        grid-template-columns: 1fr;
    }

    .haushalt-fahrzeug-notes-panel {
        grid-template-columns: 1fr;
    }
}

#haushalt-vorlagen-panel {
    margin-top: 24px;
}

#haushalt-vorlagen-panel h3 {
    margin-top: 24px;
}
