.incident-statistics-chart-panel {
    --incident-statistics-color-1: #e85a32;
    --incident-statistics-color-2: #167ca5;
    --incident-statistics-color-3: #2f855a;
    --incident-statistics-color-4: #805ad5;
    --incident-statistics-color-5: #d69e2e;
    --incident-statistics-color-6: #c53030;
    --incident-statistics-color-7: #4a5568;
    --incident-statistics-color-8: #718096;
}

.incident-statistics-filter-panel {
    margin-bottom: 16px;
    padding: 0;
    overflow: hidden;
}

.incident-statistics-filter-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    padding: 18px 20px;
    border-bottom: 1px solid #e4ebef;
    background: linear-gradient(135deg, #fff 0%, #f6fafb 100%);
}

.incident-statistics-filter-heading h2 { margin: 0 0 4px; }
.incident-statistics-filter-heading p { margin: 0; color: #627682; }
.incident-statistics-range-badge {
    flex: 0 0 auto;
    padding: 7px 11px;
    border: 1px solid #d7e3e8;
    border-radius: 999px;
    color: #345363;
    background: #fff;
    font-size: 11px;
    font-weight: 800;
}

.incident-statistics-filter-form { padding: 18px 20px; }
.incident-statistics-filter-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    gap: 14px;
}
.incident-statistics-filter-fields label > span,
.incident-statistics-detail-label {
    display: block;
    margin-bottom: 6px;
    color: #425766;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.incident-statistics-filter-fields select { width: 100%; }
.incident-statistics-detail-options {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e4ebef;
}
.incident-statistics-detail-label { margin: 0 auto 0 0; }
.incident-statistics-toggle {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 155px;
    padding: 8px 10px;
    border: 1px solid #dce6ea;
    border-radius: 9px;
    background: #fbfdfe;
    cursor: pointer;
}
.incident-statistics-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.incident-statistics-toggle-control {
    position: relative;
    width: 30px;
    height: 17px;
    flex: 0 0 30px;
    border-radius: 999px;
    background: #cad6dc;
    transition: .2s ease;
}
.incident-statistics-toggle-control::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
    transition: .2s ease;
}
.incident-statistics-toggle input:checked + .incident-statistics-toggle-control { background: var(--tenant-primary, #e85a32); }
.incident-statistics-toggle input:checked + .incident-statistics-toggle-control::after { transform: translateX(13px); }
.incident-statistics-toggle strong,
.incident-statistics-toggle small { display: block; }
.incident-statistics-toggle strong { font-size: 11px; }
.incident-statistics-toggle small { margin-top: 1px; color: #6b7e89; font-size: 9px; }
.incident-statistics-category-panel,
.incident-statistics-list-panel { min-width: 0; }
.incident-statistics-list-panel { margin-top: 16px; }
.incident-statistics-pie { position: relative; box-shadow: inset 0 0 0 1px rgba(23, 63, 82, .06); }
.incident-statistics-pie::after {
    content: '';
    position: absolute;
    inset: 27%;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(23, 63, 82, .06);
}
.incident-statistics-pie > span {
    position: absolute;
    z-index: 1;
    inset: 34%;
    display: grid;
    place-content: center;
    text-align: center;
}
.incident-statistics-pie > span strong { color: #173f52; font-size: 25px; line-height: 1; }
.incident-statistics-pie > span small { margin-top: 3px; color: #627682; font-size: 9px; text-transform: uppercase; }
.incident-statistics-date,
.incident-statistics-table td > small { display: block; }
.incident-statistics-table td > small { margin-top: 3px; color: #71838d; font-size: 10px; }
.incident-statistics-count {
    display: inline-grid;
    min-width: 29px;
    height: 29px;
    place-items: center;
    border-radius: 9px;
    color: #173f52;
    background: #eaf2f5;
    font-weight: 800;
}
.incident-statistics-detail-cell { max-width: 320px; color: #4c616d; font-size: 11px; line-height: 1.5; }

.incident-statistics-list-panel {
    padding: 22px 24px;
    border-radius: 14px;
}
.incident-statistics-record-count {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px;
    color: #173f52;
    background: #eaf2f5;
    font-size: 18px;
    font-weight: 800;
}
.incident-statistics-records { display: grid; gap: 10px; }
.incident-statistics-record {
    display: grid;
    grid-template-columns: 82px minmax(220px, 1fr) auto auto;
    align-items: center;
    gap: 18px;
    padding: 14px 16px;
    border: 1px solid #dce6ea;
    border-left: 4px solid var(--tenant-primary, #e85a32);
    border-radius: 12px;
    background: linear-gradient(135deg, #fff 0%, #f8fbfc 100%);
    box-shadow: 0 6px 18px rgba(23, 63, 82, .045);
}
.incident-statistics-record-date { display: grid; justify-items: center; padding-right: 14px; border-right: 1px solid #e1eaee; }
.incident-statistics-record-date strong { color: #173f52; font-size: 23px; line-height: 1; }
.incident-statistics-record-date span { margin-top: 2px; color: #4f6673; font-size: 11px; font-weight: 700; }
.incident-statistics-record-date small { margin-top: 5px; color: #80909a; font-size: 9px; }
.incident-statistics-record-main { min-width: 0; }
.incident-statistics-record-main h3 { margin: 3px 0 1px; color: #203541; font-size: 16px; }
.incident-statistics-record-main p { margin: 0 0 5px; color: #647985; font-size: 11px; }
.incident-statistics-record-main > small { display: block; overflow: hidden; color: #667b87; font-size: 10px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.incident-statistics-record-category { display: inline-flex; padding: 3px 7px; border-radius: 999px; color: #9f371f; background: #fff0eb; font-size: 9px; font-weight: 800; }
.incident-statistics-record-metrics { display: flex; gap: 8px; }
.incident-statistics-record-metrics > span { display: grid; min-width: 76px; justify-items: center; padding: 8px 10px; border-radius: 9px; background: #edf3f6; }
.incident-statistics-record-metrics strong { color: #173f52; font-size: 17px; }
.incident-statistics-record-metrics small { color: #6b7e89; font-size: 8px; }
.incident-statistics-record-link { color: #1a6685; font-size: 10px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.incident-statistics-record-link:hover { color: #e85a32; }

.incident-statistics-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.incident-statistics-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    max-width: 1180px;
    margin: 0 auto 16px;
}
.incident-statistics-kpi {
    min-width: 0;
    padding: 16px 18px;
    border: 1px solid #dce6ea;
    border-radius: 12px;
    background: linear-gradient(145deg, #fff 0%, #f7fafb 100%);
    box-shadow: 0 7px 20px rgba(23, 63, 82, .05);
}
.incident-statistics-kpi span,
.incident-statistics-kpi small { display: block; }
.incident-statistics-kpi span { color: #627682; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.incident-statistics-kpi strong { display: block; margin: 5px 0 2px; color: #173f52; font-size: 28px; line-height: 1; }
.incident-statistics-kpi small { color: #71838d; font-size: 10px; }

.incident-statistics-chart-panel {
    width: min(100%, 1180px);
    margin-inline: auto;
    padding: 22px 24px;
}

.incident-statistics-heading,
.incident-statistics-table-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.incident-statistics-heading h2,
.incident-statistics-table-heading h2 {
    margin: 0 0 5px;
}

.incident-statistics-heading p,
.incident-statistics-table-heading p {
    margin: 0;
    color: #627682;
}

.incident-statistics-total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex: 0 0 auto;
}

.incident-statistics-total span {
    color: #627682;
    font-size: 12px;
}

.incident-statistics-total strong {
    color: #173f52;
    font-size: 30px;
    line-height: 1.1;
}

.incident-statistics-chart-layout {
    display: block;
    max-width: 960px;
    margin-inline: auto;
}

.incident-statistics-bars {
    display: grid;
    gap: 22px;
    padding: 10px 6px 14px;
}

.incident-statistics-bar-row {
    display: grid;
    gap: 8px;
}

.incident-statistics-bar-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    color: #263c48;
    font-size: 14px;
    font-weight: 700;
}

.incident-statistics-bar-value {
    flex: 0 0 auto;
    color: #627682;
    font-size: 12px;
    font-weight: 600;
}

.incident-statistics-bar-value strong {
    color: #173f52;
    font-size: 15px;
}

.incident-statistics-bar-track {
    position: relative;
    height: 32px;
    overflow: visible;
    border-radius: 10px;
    background: #edf2f5;
    box-shadow: inset 0 0 0 1px rgba(23, 63, 82, .07);
}

.incident-statistics-bar {
    position: relative;
    width: max(8px, var(--incident-statistics-value));
    height: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 14px rgba(23, 63, 82, .12);
    cursor: help;
    transition: filter .18s ease, transform .18s ease, box-shadow .18s ease;
}

.incident-statistics-bar:hover,
.incident-statistics-bar:focus-visible {
    z-index: 2;
    filter: saturate(1.12) brightness(1.04);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(23, 63, 82, .22);
    outline: none;
}

.incident-statistics-bar::after {
    content: attr(data-tooltip);
    position: absolute;
    z-index: 4;
    left: 0;
    bottom: calc(100% + 9px);
    width: max-content;
    max-width: min(320px, 75vw);
    padding: 8px 11px;
    border-radius: 8px;
    color: #fff;
    background: #173f52;
    box-shadow: 0 8px 24px rgba(14, 40, 53, .2);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity .16s ease, transform .16s ease;
}

.incident-statistics-bar:hover::after,
.incident-statistics-bar:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
}

.incident-statistics-pie {
    width: 100%;
    max-width: 340px;
    aspect-ratio: 1;
    margin-inline: auto;
    border: 1px solid #d6e1e6;
    border-radius: 50%;
    background:
        var(--incident-statistics-gradient);
}

.incident-statistics-legend {
    display: grid;
    gap: 4px;
}

.incident-statistics-legend-row {
    display: grid;
    grid-template-columns:
        14px
        minmax(130px, 1fr)
        minmax(30px, auto)
        minmax(52px, auto);
    gap: 9px;
    align-items: center;
    min-height: 32px;
    padding: 5px 0;
    border-bottom: 1px solid #e4ebef;
}

.incident-statistics-legend-row:last-child {
    border-bottom: 0;
}

.incident-statistics-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 7px;
    border-radius: 3px;
    vertical-align: -1px;
}

.incident-statistics-category {
    min-width: 0;
}

.incident-statistics-percentage {
    min-width: 50px;
    color: #627682;
    text-align: right;
}

.incident-statistics-note {
    margin: 20px 0 0;
    color: #627682;
    font-size: 12px;
}

.incident-statistics-color-1 {
    background: var(--incident-statistics-color-1);
}

.incident-statistics-color-2 {
    background: var(--incident-statistics-color-2);
}

.incident-statistics-color-3 {
    background: var(--incident-statistics-color-3);
}

.incident-statistics-color-4 {
    background: var(--incident-statistics-color-4);
}

.incident-statistics-color-5 {
    background: var(--incident-statistics-color-5);
}

.incident-statistics-color-6 {
    background: var(--incident-statistics-color-6);
}

.incident-statistics-color-7 {
    background: var(--incident-statistics-color-7);
}

.incident-statistics-color-8 {
    background: var(--incident-statistics-color-8);
}

@media (max-width: 1050px) {
    .incident-statistics-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .incident-statistics-record { grid-template-columns: 72px minmax(180px, 1fr) auto; }
    .incident-statistics-record-link { grid-column: 2 / -1; }
    .incident-statistics-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .incident-statistics-kpis { grid-template-columns: 1fr; }
    .incident-statistics-record { grid-template-columns: 58px minmax(0, 1fr); gap: 12px; }
    .incident-statistics-record-metrics { grid-column: 1 / -1; }
    .incident-statistics-record-link { grid-column: 1 / -1; }
    .incident-statistics-heading,
    .incident-statistics-table-heading {
        flex-direction: column;
    }

    .incident-statistics-total {
        align-items: flex-start;
    }

    .incident-statistics-chart-layout {
        grid-template-columns: 1fr;
    }

    .incident-statistics-pie {
        max-width: 280px;
    }

    .incident-statistics-filter-heading,
    .incident-statistics-detail-options { align-items: stretch; flex-direction: column; }
    .incident-statistics-filter-fields { grid-template-columns: 1fr; }
    .incident-statistics-detail-label { margin: 0; }
    .incident-statistics-toggle { box-sizing: border-box; width: 100%; }
}

/* BLAULICHT_DASHBOARD_INSIGHTS_START */
.dashboard-command-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.dashboard-command-panel {
    min-width: 0;
    padding: 20px;
}

.dashboard-command-panel.is-active-incidents {
    border-top: 4px solid #e65232;
}

.dashboard-incident-list {
    display: grid;
    gap: 7px;
}

.dashboard-incident-row {
    display: grid;
    grid-template-columns: minmax(105px, .55fr) minmax(150px, .7fr) minmax(180px, 1.5fr);
    gap: 14px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid var(--border-color, #dbe2ea);
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
    background: color-mix(in srgb, var(--surface-muted, #eef2f6) 66%, white);
}

.dashboard-incident-row:hover {
    border-color: #1788b8;
    background: #f4f9fc;
}

.dashboard-incident-row time {
    color: var(--text-muted, #627682);
    font-weight: 650;
}

:root[data-theme="dark"] .dashboard-incident-row {
    color: var(--ui-text);
    border-color: var(--ui-border);
    background: var(--ui-muted);
}

:root[data-theme="dark"] .dashboard-incident-row:hover {
    background: var(--ui-hover);
}

@media (max-width: 900px) {
    .dashboard-command-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
    .dashboard-incident-row { grid-template-columns: 1fr; gap: 4px; }
}

.dashboard-insight-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.15fr)
        minmax(360px, .85fr);
    gap: 16px;
    align-items: start;
    margin-bottom: 16px;
}

.dashboard-insight-panel {
    min-width: 0;
}

.dashboard-insight-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.dashboard-insight-header h2 {
    margin: 0 0 4px;
}

.dashboard-insight-header p {
    margin: 0;
    color: #627682;
}

.dashboard-statistics-layout {
    display: block;
}

.dashboard-statistics-bars {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 2px 12px;
}

.dashboard-statistics-total {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e4ebef;
}

.dashboard-appointment-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 14px;
    color: #627682;
    font-size: 12px;
}

.dashboard-appointment-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.dashboard-calendar-icon {
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    flex: 0 0 24px;
}

.dashboard-calendar-icon svg {
    width: 21px;
    height: 21px;
    fill: currentColor;
}

.dashboard-calendar-icon.is-hu {
    color: #167ca5;
}

.dashboard-calendar-icon.is-uvv {
    color: #198754;
}

.dashboard-calendar-icon.is-repair {
    color: #c92a2a;
}

.dashboard-calendar-icon.is-inspection {
    color: #8b5e00;
}

.dashboard-calendar-icon.is-tyre {
    color: #e56b16;
}

.dashboard-calendar-icon.is-tyre_overdue {
    color: #c92a2a;
}

.dashboard-appointment-row.is-tyre_overdue {
    border-left: 3px solid #c92a2a;
    background: #fff4f4;
}

.dashboard-appointment-list {
    display: grid;
}

.dashboard-appointment-row {
    display: grid;
    grid-template-columns:
        26px
        84px
        minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    min-height: 58px;
    padding: 8px 2px;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid #e4ebef;
}

.dashboard-appointment-row:last-child {
    border-bottom: 0;
}

.dashboard-appointment-row:hover {
    background: #f5f8fa;
}

.dashboard-appointment-date {
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-appointment-content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.dashboard-appointment-content strong,
.dashboard-appointment-content small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-appointment-content small {
    color: #627682;
}

.dashboard-deadline-panel {
    margin-top: 16px;
}

.dashboard-deadline-count {
    display: inline-flex;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #edf3f6;
    color: #334e5c;
    font-weight: 800;
}

.dashboard-deadline-list {
    display: grid;
    max-height: 640px;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.dashboard-deadline-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin: -4px 0 14px;
    color: #4f6875;
    font-size: 12px;
}

.dashboard-deadline-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dashboard-traffic-light {
    display: inline-block;
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 50%;
    background: #d9e2e7;
}

.dashboard-traffic-light.is-valid {
    background: #2f9e44;
}

.dashboard-traffic-light.is-warning {
    background: #f2c94c;
}

.dashboard-traffic-light.is-critical {
    background: #ed8936;
}

.dashboard-traffic-light.is-expired {
    background: #d64545;
}

.dashboard-deadline-group {
    display: grid;
}

.dashboard-deadline-group + .dashboard-deadline-group {
    margin-top: 10px;
}

.dashboard-deadline-group-heading {
    position: sticky;
    z-index: 2;
    top: 0;
    display: flex;
    min-height: 38px;
    padding: 7px 10px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #d8e2e7;
    background: #f5f8fa;
    color: #334e5c;
}

.dashboard-deadline-group-heading > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 800;
}

.dashboard-deadline-group-heading > strong {
    display: inline-flex;
    min-width: 28px;
    height: 24px;
    padding: 0 7px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #ffffff;
    font-size: 12px;
}

.dashboard-deadline-row {
    display: grid;
    grid-template-columns:
        minmax(132px, auto)
        92px
        130px
        minmax(220px, 1fr)
        28px;
    gap: 12px;
    align-items: center;
    min-height: 62px;
    padding: 9px 4px;
    border-bottom: 1px solid #e4ebef;
    color: inherit;
    text-decoration: none;
}

.dashboard-deadline-row:last-child {
    border-bottom: 0;
}

.dashboard-deadline-row:hover {
    background: #f5f8fa;
}

.dashboard-deadline-status {
    display: inline-flex;
    width: fit-content;
    padding: 5px 8px;
    border-radius: 999px;
    background: #fff5d9;
    color: #7a5200;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.dashboard-deadline-status.is-valid {
    background: #e1f4e5;
    color: #246b32;
}

.dashboard-deadline-status.is-warning {
    background: #fff5c2;
    color: #735c00;
}

.dashboard-deadline-status.is-critical,
.dashboard-deadline-status.is-today {
    background: #ffead8;
    color: #93440a;
}

.dashboard-deadline-status.is-expired {
    background: #fde3e3;
    color: #a62424;
}

.dashboard-deadline-date {
    font-weight: 750;
    white-space: nowrap;
}

.dashboard-deadline-category {
    color: #4f6875;
    font-size: 13px;
    font-weight: 700;
}

.dashboard-deadline-content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.dashboard-deadline-content strong,
.dashboard-deadline-content small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-deadline-content small {
    color: #627682;
}

.dashboard-deadline-action {
    color: #167ca5;
    font-size: 22px;
    font-weight: 800;
    text-align: center;
}

@media (max-width: 1100px) {
    .dashboard-insight-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-deadline-row {
        grid-template-columns:
            minmax(132px, auto)
            92px
            minmax(0, 1fr)
            28px;
    }

    .dashboard-deadline-category {
        display: none;
    }
}

@media (max-width: 680px) {
    .dashboard-appointment-row {
        grid-template-columns:
            24px
            78px
            minmax(0, 1fr);
    }

    .dashboard-deadline-row {
        grid-template-columns:
            minmax(0, 1fr)
            28px;
        gap: 4px 10px;
        padding: 12px 4px;
    }

    .dashboard-deadline-status {
        grid-column: 1;
        grid-row: 1;
    }

    .dashboard-deadline-date {
        grid-column: 1;
        grid-row: 2;
        font-size: 13px;
    }

    .dashboard-deadline-content {
        grid-column: 1;
        grid-row: 3;
        margin-top: 3px;
    }

    .dashboard-deadline-action {
        grid-column: 2;
        grid-row: 1 / span 3;
    }
}
/* BLAULICHT_DASHBOARD_INSIGHTS_END */

/* BLAULICHT_DASHBOARD_SPACING_START */

/*
 * Abstand der Dashboard-Inhalte zum Seitenrand.
 */
.dashboard-overview-content {
    padding: 16px;
}

/*
 * Das Grid selbst benötigt keinen zusätzlichen Außenabstand,
 * da dieser jetzt vom Wrapper übernommen wird.
 */
.dashboard-overview-content .dashboard-insight-grid {
    margin: 0;
}

/*
 * Beide Dashboard-Bereiche erhalten einen einheitlichen,
 * klar sichtbaren Rahmen.
 */
.dashboard-overview-content .dashboard-insight-panel {
    border: 1px solid #d6e1e6;
    background: #ffffff;
    box-shadow: none;
}

/*
 * Etwas mehr Innenabstand innerhalb der beiden Bereiche.
 */
.dashboard-overview-content .ui-panel {
    padding: 16px;
}

@media (max-width: 680px) {
    .dashboard-overview-content {
        padding: 8px;
    }

    .dashboard-overview-content .ui-panel {
        padding: 12px;
    }
}

/* BLAULICHT_DASHBOARD_SPACING_END */

/* BLAULICHT_STATISTICS_PAGE_SPACING_START */

.incident-statistics-page {
    padding: 16px;
}

.incident-statistics-page
    > .incident-statistics-grid {
    margin: 0;
}

.incident-statistics-page
    > .ui-panel {
    margin: 0;
}

@media (max-width: 680px) {
    .incident-statistics-page {
        padding: 8px;
    }
}

/* BLAULICHT_STATISTICS_PAGE_SPACING_END */

/* BLAULICHT_STATISTICS_PANEL_PADDING_START */

/*
 * Innenabstand der Boxen auf der eigenständigen
 * Seite Einsatzstatistik.
 */
.incident-statistics-page .ui-panel {
    padding: 18px;
}

/*
 * Tabelleninhalt ebenfalls mit Abstand zum Rahmen.
 */
.incident-statistics-page .ui-table-wrapper {
    margin-top: 4px;
}

/*
 * Überschriften nicht direkt am oberen Boxrand.
 */
.incident-statistics-page
    .incident-statistics-heading,
.incident-statistics-page
    .incident-statistics-table-heading {
    margin-top: 0;
}

@media (max-width: 680px) {
    .incident-statistics-page .ui-panel {
        padding: 12px;
    }
}

/* BLAULICHT_STATISTICS_PANEL_PADDING_END */

/* BLAULICHT_STATISTICS_PIE_SIZE_START */

.incident-statistics-page
    .incident-statistics-chart-layout {
    display: block;
}

.incident-statistics-page
    .incident-statistics-pie {
    width: 290px;
    max-width: 100%;
}

@media (max-width: 680px) {
    .incident-statistics-page
        .incident-statistics-pie {
        width: 260px;
    }
}

/* BLAULICHT_STATISTICS_PIE_SIZE_END */

.dashboard-celebration-panel {
    margin-top: 20px;
    padding: 22px;
}

.dashboard-celebration-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.dashboard-celebration-row {
    align-items: center;
    background: color-mix(in srgb, var(--surface-muted, #eef2f6) 72%, white);
    border: 1px solid var(--border-color, #dbe2ea);
    border-left: 4px solid #2b78a6;
    border-radius: 12px;
    color: inherit;
    display: grid;
    gap: 16px;
    grid-template-columns: auto 110px minmax(0, 1fr) auto;
    padding: 14px 16px;
    text-decoration: none;
}

.dashboard-celebration-row:not(.is-service_milestone) {
    grid-template-columns: 110px minmax(0, 1fr) auto;
}

.dashboard-jubilee-star {
    align-items: center;
    background: #e9f2ff;
    border-radius: 50%;
    color: #2563a6;
    display: inline-flex;
    font-size: 1.45rem;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.dashboard-celebration-row.is-service-20 .dashboard-jubilee-star { background: #e2f6f2; color: #087f6b; }
.dashboard-celebration-row.is-service-30 .dashboard-jubilee-star { background: #e9f7e7; color: #32823c; }
.dashboard-celebration-row.is-service-40 .dashboard-jubilee-star { background: #fff4cc; color: #9b6a00; }
.dashboard-celebration-row.is-service-50 .dashboard-jubilee-star { background: #ffeadb; color: #c25418; }
.dashboard-celebration-row.is-service-60 .dashboard-jubilee-star { background: #ffe1df; color: #b83232; }
.dashboard-celebration-row.is-service-70 .dashboard-jubilee-star { background: #f1e7ff; color: #7b3fb0; }
.dashboard-celebration-row.is-service-80 .dashboard-jubilee-star { background: #e7e8ff; color: #4b50b6; }
.dashboard-celebration-row.is-service-90 .dashboard-jubilee-star { background: #fff0bd; color: #8a5d00; }
.dashboard-celebration-row.is-service-100 .dashboard-jubilee-star { background: #ffe7a1; color: #6e4700; box-shadow: 0 0 0 3px #f4c54255; }

.dashboard-celebration-row.is-age_milestone,
.dashboard-celebration-row.is-service_milestone {
    border-left-color: #e45b3b;
}

.dashboard-celebration-content {
    display: grid;
    gap: 3px;
}

.dashboard-celebration-department {
    color: var(--text-muted, #667085);
    font-size: 0.9em;
    font-weight: 600;
}

.dashboard-celebration-content small,
.dashboard-celebration-countdown {
    color: var(--text-muted, #667085);
}

.dashboard-celebration-date,
.dashboard-celebration-countdown {
    font-weight: 700;
}

:root[data-theme="dark"] .dashboard-overview-content .dashboard-insight-panel {
    color:var(--ui-text);
    border-color:var(--ui-border);
    background:var(--ui-panel);
}
:root[data-theme="dark"] .dashboard-insight-header p,
:root[data-theme="dark"] .dashboard-appointment-legend,
:root[data-theme="dark"] .dashboard-appointment-content small,
:root[data-theme="dark"] .dashboard-deadline-legend,
:root[data-theme="dark"] .dashboard-celebration-content small,
:root[data-theme="dark"] .dashboard-celebration-department,
:root[data-theme="dark"] .dashboard-celebration-countdown {
    color:var(--ui-text-muted);
}
:root[data-theme="dark"] .dashboard-statistics-total,
:root[data-theme="dark"] .dashboard-appointment-row {
    border-color:var(--ui-border);
}
:root[data-theme="dark"] .dashboard-appointment-row:hover { background:var(--ui-hover); }
:root[data-theme="dark"] .dashboard-appointment-row.is-tyre_overdue { background:#3b2023; }
:root[data-theme="dark"] .dashboard-deadline-count { color:var(--ui-text); background:var(--ui-muted); }
:root[data-theme="dark"] .dashboard-celebration-row {
    color:var(--ui-text);
    border-color:var(--ui-border);
    background:var(--ui-muted);
}

@media (max-width: 680px) {
    .dashboard-celebration-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .dashboard-celebration-row:not(.is-service_milestone) {
        grid-template-columns: 1fr;
    }
}

/* Symmetric dashboard card layout. */
.dashboard-overview-content {
    display: grid;
    gap: 16px;
}

.dashboard-overview-content .dashboard-command-grid,
.dashboard-overview-content .dashboard-insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 16px;
    margin: 0;
}

.dashboard-overview-content .ui-panel {
    box-sizing: border-box;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--border-color, #d6e1e6);
    border-radius: 16px;
    background: var(--surface-color, #fff);
    box-shadow: 0 8px 24px rgba(23, 63, 82, .06);
}

.dashboard-overview-content .dashboard-command-panel,
.dashboard-overview-content .dashboard-insight-panel {
    height: 100%;
}

.dashboard-overview-content .dashboard-command-panel {
    min-height: 190px;
}

.dashboard-overview-content .dashboard-insight-panel {
    min-height: 250px;
}

.dashboard-overview-content .dashboard-celebration-panel,
.dashboard-overview-content .dashboard-deadline-panel {
    width: 100%;
}

.dashboard-overview-content .ui-empty {
    display: grid;
    min-height: 92px;
    place-items: center;
    text-align: center;
}

:root[data-theme="dark"] .dashboard-overview-content .ui-panel {
    border-color: var(--ui-border);
    background: var(--ui-panel);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .2);
}

@media (max-width: 1100px) {
    .dashboard-overview-content .dashboard-command-grid,
    .dashboard-overview-content .dashboard-insight-grid {
        grid-template-columns: 1fr;
    }
}
