/* Berichtsseite (Reports 2, Ordner Reports/Bericht/, Vorsatz rb-): Auswahlen, Angaben, Kacheln je Anzahl, Diagramme als SVG, Reiter,
   sortierbare Tabellen. Optik wie oo.reports.css (rp-): Haarlinien, Ecken 3–4 px, Farbe trägt Bedeutung (Vorjahr grau, gut grün,
   Warnung bernstein, schlecht rot), sonst die Farbe nach dem Platz der Reihe. Schwellen messen die Seite (Containerabfragen). */
.rb-auswahl { display:flex; align-items:center; flex-wrap:wrap; gap:10px 16px; }
.rb-feld { display:inline-flex; align-items:center; gap:6px; font-size:12px; color:var(--tinte-3); }
.rb-feld input[type=number] { width:78px; }
.rb-haken { display:inline-flex; align-items:center; gap:6px; font-size:12px; color:var(--tinte-2); cursor:pointer; }
.rb-haken input { margin:0; }
.rb-ebay { margin:-4px 0 0; color:var(--tinte-3); font-size:12px; }
.rb-ebay a { color:inherit; border-bottom:1px solid var(--linie-stark); text-decoration:none; }
.rb-ebay a:hover { border-bottom-color:var(--tinte-2); }

.rb-angaben { list-style:none; margin:0; padding:14px 18px 0; display:flex; flex-wrap:wrap; gap:6px 20px; font-size:12px; color:var(--tinte-3); }
.rb-angabe strong { margin-left:6px; color:var(--tinte-1); font-weight:500; }
.rb-angabe small { margin-left:6px; color:var(--tinte-4); }
.rb-hinweis { flex-basis:100%; color:var(--tinte-3); }

/* Kacheln: so viele nebeneinander, wie ihre Werte zulassen (BerichtAnsicht.KachelRaster: höchstens sechs kurze, sonst vier, gleichmäßig
   verteilt), darunter weniger. Die letzte Kachel jeder Reihe ohne Linie rechts; :where hält die Regeln je Spaltenzahl so schwach, dass
   die Containerabfragen unten sie mit einfachen Wählern ersetzen. */
.rb-kacheln .rp-kacheln { grid-template-columns:repeat(var(--rb-spalten, 4), minmax(0, 1fr)); row-gap:14px; }
.rb-kacheln .rp-kachel { border-right:1px solid var(--linie); }
:where(.rb-spalten-1) .rp-kachel, :where(.rb-spalten-2) .rp-kachel:nth-child(2n), :where(.rb-spalten-3) .rp-kachel:nth-child(3n),
:where(.rb-spalten-4) .rp-kachel:nth-child(4n), :where(.rb-spalten-5) .rp-kachel:nth-child(5n), :where(.rb-spalten-6) .rp-kachel:nth-child(6n) { border-right:0; }
.rb-kacheln .rp-kachel:last-child { border-right:0; }

/* Diagramme nebeneinander, solange jedes sein ganzes Bild zeigen kann (Spalte = Bild 500 px + Rand), sonst untereinander; nur schmaler als
   ein Bild (Handy) rollt es in seiner Fläche. Die Linien zwischen den Flächen ziehen ihre eigenen Ränder links und oben, die an der
   Außenkante abgeschnitten werden: so stimmen sie bei jedem Umbruch, auch mit einer leeren letzten Zelle. */
.rb-diagramme { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(536px, 100%), 1fr)); border-top:1px solid var(--linie); overflow:hidden; }
.rb-diagramm { margin:-1px 0 0 -1px; padding:12px 18px 14px; min-width:0; overflow-x:auto; border-left:1px solid var(--linie); border-top:1px solid var(--linie); }
.rb-diagramm-kopf { display:flex; align-items:baseline; flex-wrap:wrap; gap:6px 14px; margin-bottom:8px; font-size:12px; color:var(--tinte-3); }
.rb-diagramm-titel { color:var(--tinte-2); font-weight:600; }
.rb-diagramm-kopf small { color:var(--tinte-4); font-size:11px; }
.rb-legenden { display:inline-flex; flex-wrap:wrap; gap:4px 12px; margin-left:auto; }
.rb-legende { display:inline-flex; align-items:center; gap:5px; color:var(--tinte-4); font-size:11px; }
.rb-legende i, .rb-ring-legende i { display:inline-block; width:10px; height:10px; border-radius:2px; background:var(--rb-farbe, var(--akzent)); }
.rb-svg { display:block; width:100%; height:auto; min-width:500px; overflow:visible; }
.rb-svg text { font-family:inherit; font-size:10px; fill:var(--tinte-3); font-variant-numeric:tabular-nums; }
.rb-gitter { stroke:var(--linie-fein); stroke-width:1; }
.rb-nulllinie { stroke:var(--linie-stark); stroke-width:1; }
.rb-rangliste .rb-rubrik { fill:var(--tinte-2); font-size:11px; }
.rb-saeule, .rb-balken, .rb-ringstueck { fill:var(--rb-farbe, var(--akzent)); }
.rb-saeule:hover, .rb-balken:hover, .rb-ringstueck:hover { opacity:.8; }
.rb-flaeche { fill:var(--rb-farbe, var(--akzent)); fill-opacity:.16; stroke:none; }
.rb-linie { fill:none; stroke:var(--rb-farbe, var(--akzent)); stroke-width:1.6; }
.rb-ringstueck { stroke:var(--flaeche); stroke-width:1.5; }
.rb-ring { display:flex; align-items:center; gap:18px; flex-wrap:wrap; }
.rb-ring .rb-svg.rb-ringbild { width:170px; min-width:0; flex:0 0 auto; }
.rb-ring-summe { font-size:14px; font-weight:600; fill:var(--tinte-1); }
.rb-ring-legende { list-style:none; margin:0; padding:0; display:grid; gap:4px; font-size:12px; flex:1 1 200px; min-width:0; }
.rb-ring-legende li { display:grid; grid-template-columns:10px minmax(0, 1fr) auto auto; gap:8px; align-items:center; }
.rb-ring-legende span:nth-child(2) { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rb-ring-legende .rb-zahl { color:var(--tinte-3); font-variant-numeric:tabular-nums; text-align:right; }
.rb-leer { padding:30px 0; text-align:center; color:var(--tinte-4); font-size:12px; }
.rb-fussnote { margin-top:6px; color:var(--tinte-4); font-size:11px; }

/* Farbe einer Reihe: zuerst ihre Rolle, sonst ihr Platz. */
.rb-reihe-0 { --rb-farbe:var(--akzent); }
.rb-reihe-1 { --rb-farbe:var(--violett); }
.rb-reihe-2 { --rb-farbe:var(--ok); }
.rb-reihe-3 { --rb-farbe:var(--warn); }
.rb-reihe-4 { --rb-farbe:var(--tinte-3); }
.rb-reihe-5 { --rb-farbe:var(--akzent-dunkel); }
.rb-rolle-vergleich { --rb-farbe:var(--linie-stark); }
.rb-rolle-sammelposten { --rb-farbe:var(--tinte-5); }
.rb-rolle-gut { --rb-farbe:var(--ok); }
.rb-rolle-warnung { --rb-farbe:var(--warn); }
.rb-rolle-schlecht { --rb-farbe:var(--alarm); }
.rb-rolle-laufend { --rb-farbe:var(--akzent); }

/* Reiter der Tabellen. */
.rb-reiter { display:flex; padding:0 12px; border-top:1px solid var(--linie); overflow-x:auto; }
.rb-reiter button { height:36px; padding:0 12px; border:0; background:none; color:var(--tinte-3); font:inherit; font-size:12px; white-space:nowrap; cursor:pointer; box-shadow:inset 0 -2px 0 transparent; }
.rb-reiter button:hover { color:var(--tinte-1); }
.rb-reiter button[aria-selected=true] { color:var(--tinte-1); font-weight:600; box-shadow:inset 0 -2px 0 var(--tinte-2); }

/* Tabelle: Zahlen rechtsbündig, Text links; der Kopf sortiert. */
.rb-tabelle th.rb-text, .rb-tabelle td.rb-text { text-align:left; }
.rb-tabelle th.rb-zahl, .rb-tabelle td.rb-zahl { text-align:right; }
.rb-sortieren { border:0; background:none; padding:0; font:inherit; color:inherit; cursor:pointer; }
.rb-sortieren:hover { color:var(--tinte-1); }
.rb-tabelle th[aria-sort=ascending] .rb-sortieren::after { content:" ↑"; }
.rb-tabelle th[aria-sort=descending] .rb-sortieren::after { content:" ↓"; }
.rb-tabelle-fuss { display:flex; align-items:center; flex-wrap:wrap; gap:10px; padding:8px 18px; color:var(--tinte-4); font-size:11px; border-top:1px solid var(--linie-fein); }
.rb-tabelle-fuss > span { margin-right:auto; }
.rb-tabelle-fuss > .rb-rest { margin-right:0; }
.rb-csv { gap:6px; }

@container (max-width: 1000px) {
    .rb-kacheln .rp-kacheln { grid-template-columns:repeat(3, minmax(0, 1fr)); }
    .rb-kacheln .rp-kachel { border-right:1px solid var(--linie); }
    .rb-kacheln .rp-kachel:nth-child(3n), .rb-kacheln .rp-kachel:last-child { border-right:0; }
}

@container (max-width: 720px) {
    .rb-kacheln .rp-kacheln { grid-template-columns:repeat(2, minmax(0, 1fr)); }
    .rb-kacheln .rp-kachel { border-right:1px solid var(--linie); }
    .rb-kacheln .rp-kachel:nth-child(2n), .rb-kacheln .rp-kachel:last-child { border-right:0; }
    /* Ein großer Betrag („1.237.788,55 €“) passt am Handy nur kleiner gesetzt in eine halbe Breite. */
    .rb-kacheln.rb-lang .rp-kachel { padding:0 12px; }
    .rb-kacheln.rb-lang .rp-kachel strong { font-size:17px; }
    .rb-auswahl { gap:8px 12px; }
}

@container (max-width: 330px) {
    /* Schmale Telefone (360 px): noch eine Stufe kleiner, sonst fehlt einem Betrag ab 100 Mio. oder mit Minus das Ende. */
    .rb-kacheln.rb-lang .rp-kachel strong { font-size:15px; }
}
