/* Monitoring & Infrastruktur (nutzt die Theme-Variablen aus app.css) */
.status-neutral {
    background: color-mix(in srgb, var(--TextSecondary) 12%, var(--BgCard));
    border-color: color-mix(in srgb, var(--TextSecondary) 40%, var(--Border));
    color: var(--TextSecondary);
}

.summary-tile.neutral { border-left-color: var(--TextMuted); }
.summary-tile.neutral strong { color: var(--TextSecondary); }
.summary-tile.error { border-left-color: var(--Danger); }
.summary-tile.error strong { color: var(--Danger); }

a.summary-tile { color: inherit; display: block; text-decoration: none; }
a.summary-tile:hover { border-color: var(--BorderActive); }

.summary-tile small {
    color: var(--TextSecondary);
    display: block;
    font-size: 0.8rem;
    margin-top: 0.35rem;
}

.summary-tile strong.small-value { font-size: 1.5rem; }

.tabs {
    border-bottom: 1px solid var(--Border);
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin: 0 auto 1.25rem;
    max-width: var(--PageMaxWidth);
}

.tab-btn {
    background: transparent;
    border: 0;
    border-bottom: 3px solid transparent;
    color: var(--TextSecondary);
    cursor: pointer;
    font-weight: 700;
    padding: 0.6rem 1rem;
}

.tab-btn:hover { color: var(--TextPrimary); }
.tab-btn.active { border-bottom-color: var(--Accent); color: var(--TextPrimary); }

.tab-btn .count {
    background: var(--Danger);
    border-radius: 999px;
    color: #fff;
    font-size: 0.72rem;
    margin-left: 0.4rem;
    padding: 0.05rem 0.45rem;
}

.panel-block {
    background: var(--BgCard);
    border: 1px solid var(--Border);
    border-radius: var(--Radius);
    box-shadow: var(--ShadowPanel);
    margin: 0 auto 1.25rem;
    max-width: var(--PageMaxWidth);
    padding: 1rem;
}

.panel-block h3 { font-size: 1.05rem; margin: 0 0 0.75rem; }

.toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 auto 1rem;
    max-width: var(--PageMaxWidth);
}

.toolbar .spacer { flex: 1 1 auto; }
.toolbar .form-control, .toolbar .form-select { width: auto; }

.range-btn.active { background: var(--Accent); border-color: var(--Accent); color: #fff; }

.chart-title {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.chart-title h3 { margin: 0; }
.chart-stats { color: var(--TextSecondary); font-size: 0.85rem; }
.chart-stats b { color: var(--TextPrimary); }

.chart-wrap { padding: 0 0 1.4rem 3.2rem; position: relative; }

.chart {
    background: color-mix(in srgb, var(--BgDark) 55%, var(--BgCard));
    border: 1px solid var(--Border);
    border-radius: 6px;
    display: block;
    height: 210px;
    width: 100%;
}

.chart .grid { stroke: var(--Border); stroke-dasharray: 3 4; stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .cursor { stroke: var(--TextSecondary); stroke-width: 1; vector-effect: non-scaling-stroke; }

.chart-ylabels {
    bottom: 1.4rem;
    color: var(--TextSecondary);
    display: flex;
    flex-direction: column;
    font-size: 0.72rem;
    justify-content: space-between;
    left: 0;
    position: absolute;
    text-align: right;
    top: 0;
    width: 2.9rem;
}

.chart-xlabels {
    bottom: 0;
    color: var(--TextSecondary);
    display: flex;
    font-size: 0.72rem;
    justify-content: space-between;
    left: 3.2rem;
    position: absolute;
    right: 0;
}

.chart-tip {
    background: var(--BgHeader);
    border: 1px solid var(--Border);
    border-radius: 6px;
    box-shadow: var(--ShadowControl);
    font-size: 0.8rem;
    margin-left: 3.2rem;
    padding: 0.4rem 0.6rem;
    pointer-events: none;
    position: absolute;
    top: 0.5rem;
    white-space: nowrap;
    z-index: 5;
}

.chart-tip i { border-radius: 50%; display: inline-block; height: 0.6rem; margin-right: 0.4rem; width: 0.6rem; }
.chart-tip .tip-time { color: var(--TextSecondary); margin-bottom: 0.2rem; }

.chart-empty {
    color: var(--TextSecondary);
    left: 3.2rem;
    position: absolute;
    right: 0;
    text-align: center;
    top: 90px;
}

.table-scroll { overflow-x: auto; }
.data-table { border-collapse: collapse; width: 100%; }

.data-table th, .data-table td {
    border-bottom: 1px solid var(--Border);
    padding: 0.5rem 0.6rem;
    text-align: left;
    vertical-align: middle;
}

.data-table th { color: var(--TextSecondary); font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.data-table th.sortable { cursor: pointer; user-select: none; }
.data-table th.sortable:hover { color: var(--TextPrimary); }
.data-table td.nowrap { white-space: nowrap; }
.data-table tr.row-bad td { background: color-mix(in srgb, var(--Danger) 8%, transparent); }
.data-table tr.row-warn td { background: color-mix(in srgb, var(--Warning) 7%, transparent); }
.data-table .num { text-align: right; white-space: nowrap; }
.data-table .btn { margin: 0.1rem 0.15rem 0.1rem 0; }

.sev-info { color: var(--Info); }
.sev-warn { color: var(--Warning); }
.sev-err { color: var(--Danger); }
.ok-text { color: var(--Success); }

.filter-bar {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin-bottom: 0.75rem;
}

.notice {
    background: color-mix(in srgb, var(--Info) 9%, var(--BgCard));
    border: 1px solid color-mix(in srgb, var(--Info) 40%, var(--Border));
    border-radius: var(--Radius);
    color: var(--TextPrimary);
    margin: 0 auto 1rem;
    max-width: var(--PageMaxWidth);
    padding: 0.75rem 1rem;
}

.notice.warn { background: color-mix(in srgb, var(--Warning) 9%, var(--BgCard)); border-color: color-mix(in srgb, var(--Warning) 45%, var(--Border)); }
.notice.error { background: color-mix(in srgb, var(--Danger) 9%, var(--BgCard)); border-color: color-mix(in srgb, var(--Danger) 45%, var(--Border)); }
.notice ul { margin: 0.4rem 0 0; padding-left: 1.2rem; }

.inline-form {
    align-items: end;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.inline-form label { color: var(--TextSecondary); display: block; font-size: 0.78rem; font-weight: 700; margin-bottom: 0.2rem; }

.bar-stack {
    background: var(--BgDark);
    border: 1px solid var(--Border);
    border-radius: 6px;
    display: flex;
    height: 28px;
    overflow: hidden;
}

.bar-stack > div { min-width: 2px; }

.legend { color: var(--TextSecondary); display: flex; flex-wrap: wrap; font-size: 0.85rem; gap: 0.4rem 1.2rem; margin-top: 0.6rem; }
.legend i { border-radius: 3px; display: inline-block; height: 0.7rem; margin-right: 0.35rem; width: 0.7rem; }

.bar-cell { background: var(--BgDark); border-radius: 4px; display: inline-block; height: 8px; margin-right: 0.5rem; vertical-align: middle; width: 70px; }
.bar-cell > div { background: var(--Accent); border-radius: 4px; height: 100%; }

.modal-backdrop-lite {
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 1rem;
    position: fixed;
    z-index: 50;
}

.confirm-dialog {
    background: var(--BgCard);
    border: 1px solid var(--Border);
    border-radius: var(--Radius);
    box-shadow: var(--ShadowOverlay);
    max-height: 85vh;
    max-width: 640px;
    overflow: auto;
    padding: 1.25rem;
    width: 100%;
}

.confirm-dialog h3 { margin: 0 0 0.5rem; }
.confirm-dialog ul { color: var(--TextSecondary); font-size: 0.9rem; max-height: 220px; overflow: auto; padding-left: 1.2rem; }
.confirm-dialog .dialog-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: flex-end; margin-top: 1rem; }

.group-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.group-card { background: var(--BgDark); border: 1px solid var(--Border); border-radius: var(--Radius); padding: 0.7rem 0.85rem; }
.group-card small { color: var(--TextSecondary); display: block; }

.log-lines {
    background: var(--BgDark);
    border: 1px solid var(--Border);
    border-radius: 6px;
    font-family: Consolas, monospace;
    font-size: 0.78rem;
    margin: 0.5rem 0 0;
    max-height: 260px;
    overflow: auto;
    padding: 0.6rem;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 600px) {
    .chart-wrap { padding-left: 2.6rem; }
    .chart-ylabels { width: 2.3rem; }
    .chart-xlabels { left: 2.6rem; }
    .chart-tip { margin-left: 2.6rem; }
}
