html { font-size: 15px; }
body { background: #f4f6f8; }

.ct-nav { background: #1f4e79; }
.ct-nav .nav-link { color: rgba(255,255,255,.85); border-bottom: 3px solid transparent; }
.ct-nav .nav-link:hover { color: #fff; }
.ct-nav .nav-link.active { color: #fff; font-weight: 600; border-bottom-color: #8ec5ff; }

/* Briefumschlag links oben: kaum sichtbar, beim Darüberfahren deutlich + Name des Programmierers */
.ct-kontakt { position: relative; display: inline-flex; align-items: center; justify-content: center;
              width: 30px; height: 30px; margin-right: .6rem; border-radius: .4rem;
              color: #fff; opacity: .2; transition: opacity .15s, background-color .15s; text-decoration: none; }
.ct-kontakt:hover, .ct-kontakt:focus-visible { opacity: 1; background: rgba(255,255,255,.15); color: #fff; }
.ct-kontakt-name { position: absolute; left: calc(100% + .4rem); top: 50%; transform: translateY(-50%);
                   white-space: nowrap; font-size: .8rem; padding: .2rem .55rem; border-radius: .3rem;
                   background: #fff; color: #1f4e79; box-shadow: 0 2px 6px rgba(0,0,0,.2);
                   opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 1050; }
.ct-kontakt:hover .ct-kontakt-name, .ct-kontakt:focus-visible .ct-kontakt-name { opacity: 1; }

.card { border: none; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.kpi .wert { font-size: 2rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .titel { color: #6c757d; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.kpi .vergleich { font-size: .8rem; color: #6c757d; }
.kpi .plus { color: #198754; }
.kpi .minus { color: #dc3545; }

.table td, .table th { vertical-align: middle; }
.table .zahl { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabelle-scroll { max-height: 70vh; overflow: auto; }
.tabelle-scroll thead th { position: sticky; top: 0; background: #fff; z-index: 1; }

.filterleiste .form-label { font-size: .8rem; color: #6c757d; margin-bottom: .1rem; }
.schnellwahl .btn { font-size: .8rem; }

.status-laufend { background: #fff3cd; }
.zeit { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Diagramme (Inline-SVG, Infrastructure/Diagramm.cs) */
.diagramm { width: 100%; height: auto; display: block; }
.diagramm .d-raster { stroke: #e9ecef; stroke-width: 1; }
.diagramm .d-achse { font-size: 10px; fill: #6c757d; }
.diagramm .d-grenze { stroke: #dc3545; stroke-width: 1.5; stroke-dasharray: 6 4; }
.diagramm .d-grenze-text { font-size: 10px; fill: #dc3545; }
.diagramm rect:hover { opacity: .8; }
.d-legende { display: flex; flex-wrap: wrap; gap: .9rem; font-size: .8rem; color: #495057; margin-top: .3rem; }
.d-legende i { display: inline-block; width: .8rem; height: .8rem; border-radius: .15rem; margin-right: .3rem; vertical-align: -1px; }
.d-legende i.strich { height: 0; border-top: 2px dashed; border-radius: 0; vertical-align: 3px; width: 1.1rem; background: none !important; }
.d-balken .d-zeile { display: flex; align-items: center; gap: .5rem; font-size: .85rem; margin: .2rem 0; }
.d-balken .d-name { width: 38%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-balken .d-spur { flex: 1; background: #f1f3f5; border-radius: .25rem; height: .75rem; overflow: hidden; }
.d-balken .d-spur span { display: block; height: 100%; border-radius: .25rem; }
.d-balken .d-wert { width: 5rem; text-align: end; font-variant-numeric: tabular-nums; }

/* Lagerfüllstand Zentrallager */
.lager-spur { height: 1.1rem; background: #e9ecef; border-radius: .3rem; overflow: hidden; display: flex; }
.lager-spur span { display: block; height: 100%; }

@media print {
    .ct-nav, .no-print { display: none !important; }
    body { background: #fff; }
    .tabelle-scroll { max-height: none; overflow: visible; }
}
