/* TimeFlow24 RMM - dieselben Werte wie TimeFlow24 (templates/base.html dort):
   Farben, Radien, Schatten, Schrift. Wer beides benutzt, soll keinen Bruch sehen. */
:root {
    --marke: #0877F9; --marke-dunkel: #0663D2; --marke-hell: #E8F1FE;
    --navy: #071B3D;
    --grund: #F6F9FD; --flaeche: #FFFFFF; --flaeche-2: #F8FAFC;
    --text: #0B1B3F; --text-leise: #55647A; --rand: #E4EAF2;
    --gruen: #15803D; --gruen-hell: #E7F6EC; --gruen-text: #11642F;
    --rot: #B91C1C; --rot-hell: #FDECEC;
    --orange: #B45309; --orange-hell: #FEF4E2; --orange-text: #93440A;
    --radius: 12px; --radius-klein: 10px; --radius-gross: 14px;
    --schatten: 0 1px 2px rgba(11, 27, 63, .04), 0 1px 3px rgba(11, 27, 63, .05);
    --tempo: 160ms; --sidebar-width: 256px; --topbar-hoehe: 58px;
    --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --bs-body-color: #0B1B3F; --bs-body-bg: #F6F9FD; --bs-primary: #0877F9;
    --bs-link-color: #0663D2; --bs-link-hover-color: #071B3D; --bs-border-color: #E4EAF2;
}
body { font-family: var(--bs-body-font-family); font-size: 14px; line-height: 1.55; color: var(--text); background: var(--grund); margin: 0; }
a { color: var(--marke-dunkel); text-decoration: none; }
a:hover { color: var(--navy); }
h1 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin: 0; }
h2 { font-size: 15px; font-weight: 600; margin: 0; }

.rmm { display: flex; min-height: 100vh; }
.seitenleiste {
    width: var(--sidebar-width); flex: 0 0 var(--sidebar-width); background: var(--flaeche);
    border-right: 1px solid var(--rand); display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh; z-index: 1000;
}
.seitenleiste-kopf { padding: 22px 16px 14px; display: flex; flex-direction: column; gap: 8px; }
.seitenleiste-kopf img { width: 190px; max-width: 100%; height: auto; }
.rmm-marke { align-self: flex-start; padding: 2px 9px; border-radius: 20px; background: var(--navy); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .06em; }
.seitenleiste nav { padding: 4px 12px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nv { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--radius-klein); font-weight: 500; font-size: 13.5px; color: var(--text); min-height: 44px; transition: background var(--tempo) ease, color var(--tempo) ease; }
.nv:hover { background: var(--flaeche-2); color: var(--text); }
.nv.an { background: var(--marke-hell); color: var(--marke-dunkel); font-weight: 600; }
.nv i { font-size: 16px; width: 18px; text-align: center; flex: none; }
.nv .zahl { margin-left: auto; padding: 0 7px; border-radius: 20px; background: var(--rot-hell); color: var(--rot); font-size: 11px; font-weight: 600; }
.seitenleiste-fuss { padding: 12px; border-top: 1px solid var(--rand); }

.haupt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.kopfzeile { min-height: var(--topbar-hoehe); padding: 8px 24px; background: var(--flaeche); border-bottom: 1px solid var(--rand); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13.5px; }
.kopfzeile .titel { font-weight: 600; font-size: 15px; }
.kopfzeile .pfad { color: var(--text-leise); }
.kuerzel { width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 11.5px; font-weight: 600; display: flex; align-items: center; justify-content: center; border: 0; }
.inhalt { padding: 22px 24px 32px; max-width: 1560px; display: flex; flex-direction: column; gap: 20px; width: 100%; }
.menue-knopf { display: none; border: 0; background: none; font-size: 22px; color: var(--text); padding: 0 6px; }

.karte { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius-gross); box-shadow: var(--schatten); overflow: hidden; }
.karte-kopf { padding: 14px 18px; border-bottom: 1px solid var(--rand); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.karte-rumpf { padding: 18px; }
.leise { color: var(--text-leise); }
.klein { font-size: 12.5px; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.kachel { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius-gross); box-shadow: var(--schatten); padding: 16px 18px; }
.kachel .name { font-size: 12.5px; font-weight: 500; color: var(--text-leise); }
.kachel .wert { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.3; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 20px; font-weight: 600; font-size: 11.5px; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--gruen-hell); color: var(--gruen-text); }
.pill.warn { background: var(--orange-hell); color: var(--orange-text); }
.pill.krit { background: var(--rot-hell); color: var(--rot); }
.pill.off { background: var(--flaeche-2); color: var(--text-leise); box-shadow: inset 0 0 0 1px var(--rand); }

.tabelle { width: 100%; border-collapse: collapse; margin: 0; }
.tabelle th { background: var(--flaeche-2); border-bottom: 1px solid var(--rand); padding: 10px 14px; font-weight: 600; color: var(--text-leise); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; text-align: left; }
.tabelle td { padding: 11px 14px; vertical-align: middle; border-bottom: 1px solid var(--rand); font-size: 13.5px; }
.tabelle tbody tr:last-child td { border-bottom: 0; }
.tabelle tbody tr:hover { background: #F4F8FE; }
.tabelle .unter { font-size: 12px; color: var(--text-leise); }
.tabelle a.stark, a.stark { font-weight: 600; }
.rollen { overflow-x: auto; }

.balken { height: 6px; border-radius: 3px; background: var(--rand); overflow: hidden; width: 72px; }
.balken.gross { height: 8px; border-radius: 4px; width: 100%; }
.balken span { display: block; height: 100%; border-radius: inherit; background: var(--marke); }
.balken.hoch span { background: var(--orange); }
.balken.voll span { background: var(--rot); }
.mit-balken { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }

.knopf { padding: 8px 16px; min-height: 44px; border-radius: var(--radius-klein); border: 1px solid var(--rand); background: var(--flaeche); color: var(--text); font: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: background var(--tempo) ease; }
.knopf:hover { background: var(--flaeche-2); color: var(--text); }
.knopf.haupt-knopf { background: var(--marke); border-color: var(--marke); color: #fff; }
.knopf.haupt-knopf:hover { background: var(--marke-dunkel); color: #fff; }
.knopf.klein-knopf { min-height: 34px; padding: 4px 12px; font-size: 12.5px; }
.knopf.gefahr { color: var(--rot); }
.knopf:disabled { opacity: .55; cursor: default; }

.filter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius-gross); box-shadow: var(--schatten); padding: 12px 14px; }
.filter input[type=search], .filter select, .feld { padding: 8px 12px; border: 1px solid var(--rand); border-radius: var(--radius-klein); font: inherit; font-size: 13.5px; color: var(--text); background: #fff; min-height: 40px; }
.filter .haken { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; min-height: 40px; border: 1px solid var(--rand); border-radius: var(--radius-klein); font-size: 13.5px; font-weight: 600; }
.filter .haken.an { border-color: #C3DDFD; background: var(--marke-hell); color: var(--marke-dunkel); }
.form-control, .form-select { border-color: var(--rand); border-radius: var(--radius-klein); font-size: 13.5px; min-height: 40px; }

.reiter { display: flex; gap: 2px; border-bottom: 1px solid var(--rand); overflow-x: auto; }
.reiter a { padding: 12px 14px; min-height: 44px; font-size: 13.5px; font-weight: 500; color: var(--text-leise); border-bottom: 2px solid transparent; white-space: nowrap; }
.reiter a.an { color: var(--marke-dunkel); font-weight: 600; border-bottom-color: var(--marke); }
.reiter .zahl { padding: 0 6px; border-radius: 20px; background: var(--flaeche-2); font-size: 11px; font-weight: 600; }

dl.fakten { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 9px 16px; font-size: 13.5px; }
dl.fakten dt { color: var(--text-leise); font-weight: 400; }
dl.fakten dd { margin: 0; text-align: right; font-weight: 500; overflow-wrap: anywhere; }

.hinweis { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 16px; border-radius: var(--radius); font-size: 13.5px; border: 1px solid var(--rand); background: var(--flaeche); }
.hinweis.krit { border-color: #F6C9C9; background: var(--rot-hell); color: #991B1B; }
.hinweis.warn { border-color: #F5DDB0; background: var(--orange-hell); color: var(--orange-text); }
.hinweis.gut { border-color: #BFE5CB; background: var(--gruen-hell); color: var(--gruen-text); }
.hinweis.info { border-color: #C3DDFD; background: var(--marke-hell); color: var(--marke-dunkel); }
.leer { padding: 44px 18px; text-align: center; color: var(--text-leise); }
.leer i { font-size: 2.4rem; display: block; margin-bottom: 8px; opacity: .6; }
.schritt { display: flex; gap: 14px; align-items: flex-start; }
.schritt .nr { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--marke-hell); color: var(--marke-dunkel); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 13px; }
code.befehl { display: block; padding: 12px 14px; border-radius: var(--radius-klein); background: var(--navy); color: #E8F1FE; font-size: 12.5px; white-space: pre-wrap; word-break: break-all; }
.schluessel-anzeige { font-size: 24px; font-weight: 700; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.spalten { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.spalten > .breit { flex: 2 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.spalten > .schmal { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.zustandsleiste { display: flex; gap: 2px; height: 10px; }
.zustandsleiste span { border-radius: 3px; min-width: 0; }
.legende { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-leise); }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.legende i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.anmeldung { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--navy); padding: 24px; }
.anmeldung .karte { width: 100%; max-width: 400px; padding: 28px; }

@media (max-width: 991.98px) {
    .seitenleiste { position: fixed; transform: translateX(-100%); transition: transform var(--tempo) ease; }
    .seitenleiste.offen { transform: none; box-shadow: 0 4px 14px rgba(11, 27, 63, .18); }
    .menue-knopf { display: inline-block; }
    .inhalt { padding: 16px; }
}
