/* ============================================================
   ADMINBEREICH
   Baut auf style.css auf (Farben, Schriften, .btn) und ergaenzt nur,
   was der Verwaltungsbereich zusaetzlich braucht.
   Liegt unter /css statt /admin, weil /admin ohne Login gesperrt ist –
   die Anmeldemaske braucht ihr Stylesheet aber vorher.
   ============================================================ */

/* ─── Anmeldemaske ─── */

body.admin-login {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: var(--carbon, #15151a);
}

.login-karte {
  width: 100%; max-width: 380px;
  background: var(--white, #fff);
  border-radius: var(--radius, 14px);
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  padding: 40px 36px 32px;
  text-align: center;
}
/* .logo-mark ist in style.css display:block – das text-align:center der Karte
   greift dort nicht, deshalb per auto-Rand mittig setzen. */
.login-karte .logo-mark { width: 132px; height: auto; margin: 0 auto 18px; }
.login-karte h1 { font-size: 1.6rem; margin: 0 0 4px; }
.login-karte .unter { color: var(--muted); font-size: .86rem; margin: 0 0 26px; }

.login-karte form { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.login-karte label { font-size: .8rem; font-weight: 600; color: var(--text); }
.login-karte input {
  width: 100%; padding: 11px 13px; font: inherit; font-size: .95rem;
  border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text);
}
.login-karte input:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(28,110,140,.15);
}
.login-karte button { margin-top: 10px; width: 100%; justify-content: center; }

.login-karte .fehler {
  background: rgba(28,110,140,.08);
  border: 1px solid rgba(28,110,140,.28);
  color: var(--gold);
  border-radius: 8px; padding: 10px 13px; margin: 0 0 18px;
  font-size: .86rem; text-align: left;
}

.login-karte .zurueck { margin: 22px 0 0; font-size: .8rem; }
.login-karte .zurueck a { color: var(--muted); text-decoration: none; }
.login-karte .zurueck a:hover { color: var(--gold); text-decoration: underline; }

/* ─── Grundgeruest des Adminbereichs ─── */

/* Der cremefarbene Grund muss auf <html> liegen, nicht nur auf <body>:
   style.css faerbt <html> dunkel, und ein Hintergrund am Body wird dann NICHT
   mehr auf die Seitenflaeche uebertragen. Ohne das hier blitzt beim Ueber-
   scrollen und unterhalb kurzer Seiten das dunkle Grundlayout durch. */
html.admin { background: var(--off, #f5f3ef); }
body.admin { background: var(--off, #f5f3ef); min-height: 100vh; }

/* Die Verwaltung ist ein Dashboard: die dunkle Leiste steht senkrecht am
   linken Rand, der Inhalt bekommt die uebrige Breite. Kopf- und Fusszeile
   im Stil der Website gibt es hier nicht mehr – was die Fusszeile trug,
   steht jetzt unten in der Leiste. */
.admin-kopf {
  position: fixed; top: 0; left: 0; bottom: 0; width: 236px; z-index: 60;
  background: var(--carbon, #15151a); color: #fff;
  display: flex; flex-direction: column; gap: 26px;
  padding: 24px 0 14px;
  overflow-y: auto;
  transition: width .18s ease;
}
/* Schwung ueber dem Wort, genau wie die Wortmarke im Website-Header (.logo). */
.admin-marke { display: flex; flex-direction: column; line-height: 1; gap: 2px; text-decoration: none; padding: 0 26px; flex: none; }
.admin-marke .logo-mark { width: 96px; height: auto; }
.admin-marke span { font-size: .64rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.6); }

.admin-nav { display: flex; flex-direction: column; gap: 4px; padding: 0 14px; }
.admin-nav a {
  display: flex; align-items: center; gap: 12px;
  color: rgba(255,255,255,.72); text-decoration: none;
  font-size: .91rem; font-weight: 500; padding: 10px 13px; border-radius: 9px;
  transition: var(--transition, .2s ease);
}
.admin-nav a svg { width: 18px; height: 18px; flex: none; opacity: .75; }
.admin-nav a:hover { color: #fff; background: rgba(255,255,255,.07); }
.admin-nav a.active { color: #fff; background: var(--gold, #1c6e8c); }
.admin-nav a.active svg { opacity: 1; }

/* Unten in der Leiste: der Weg zur Website, die Pflichtseiten, Abmelden. */
.admin-rand {
  margin-top: auto; display: flex; flex-direction: column; gap: 9px;
  padding: 18px 26px 0; border-top: 1px solid rgba(255,255,255,.09);
  font-size: .8rem;
}
.admin-rand-hinweis { color: rgba(255,255,255,.3); font-size: .72rem; line-height: 1.5; }

/* Der Klapp-Knopf am Fuss der Leiste. */
.admin-klapp {
  display: flex; align-items: center; justify-content: center;
  margin: 12px 14px 0; padding: 9px 0;
  border: 0; border-radius: 9px; background: none; cursor: pointer;
  color: rgba(255,255,255,.5); font: inherit;
  transition: var(--transition, .2s ease);
}
.admin-klapp:hover { color: #fff; background: rgba(255,255,255,.07); }
.admin-klapp svg { width: 16px; height: 16px; flex: none; transition: transform .18s ease; }

/* ─── Eingeklappte Leiste ───
   Nur noch die Zeichen, 68 px breit. Die Titel stehen als title an den
   Punkten, Abmelden und Hinweis brauchen die offene Leiste – wer sie
   sucht, klappt auf. */
html.leiste-zu .admin-kopf { width: 68px; }
html.leiste-zu .admin-marke { padding: 0 14px; }
html.leiste-zu .admin-marke .logo-mark { width: 40px; }
html.leiste-zu .admin-marke span,
html.leiste-zu .admin-nav a span,
html.leiste-zu .admin-rand { display: none; }
html.leiste-zu .admin-nav { padding: 0 10px; }
html.leiste-zu .admin-nav a { justify-content: center; padding: 11px 0; }
html.leiste-zu .admin-klapp { margin-top: auto; }
html.leiste-zu .admin-klapp svg { transform: rotate(180deg); }
/* Abmelden ist ein <button> in einem POST-Formular (GET waere per fremdem
   <img> ausloesbar) – deshalb hier die Button-Vorgaben des Browsers abraeumen. */
.admin-abmelden {
  display: flex; align-items: center; gap: 9px;
  border: 0; background: none; padding: 0; font: inherit; cursor: pointer;
  font-size: .8rem; color: rgba(255,255,255,.55); text-align: left; white-space: nowrap;
  transition: var(--transition, .2s ease);
}
.admin-abmelden svg { width: 15px; height: 15px; flex: none; }
.admin-abmelden:hover { color: #fff; }
.admin-abmelden:hover span { text-decoration: underline; }

/* Auf schmalen Schirmen wird die Leiste zum Kopfblock: Marke und Abmelden
   oben, die Bereiche als Zeile darunter. Pflichtseiten und Hinweis treten
   zurueck – dafuer ist am Handy kein Platz, und noetig sind sie dort nicht. */
@media (max-width: 940px) {
  .admin-kopf {
    position: static; width: auto; overflow: visible;
    flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 18px;
    padding: 12px 16px;
  }
  .admin-marke { padding: 0; }
  .admin-rand { margin: 0 0 0 auto; padding: 0; border: 0; order: 2; flex-direction: row; align-items: center; gap: 16px; }
  .admin-rand-hinweis, .admin-klapp { display: none; }
  .admin-nav { order: 3; flex: 1 1 100%; flex-direction: row; overflow-x: auto; padding: 0; }
  .admin-nav a { white-space: nowrap; padding: 8px 12px; }
}

/* Mehr Luft nach oben, weniger zur Leiste: der Inhalt klebte in der linken
   oberen Ecke seiner Flaeche. Oben traegt der Abstand, seitlich reichen
   28 px – die dunkle Leiste ist Kante genug. */
.admin-inhalt { margin-left: 236px; padding: 64px 0 72px; transition: margin-left .18s ease; }
html.leiste-zu .admin-inhalt { margin-left: 68px; }

/* Fusszeile im Stil des Dashboards: eine leise Zeile unter dem Inhalt statt
   der dunklen Leiste der Website – dunkel saehe neben der Seitenleiste nach
   einem zweiten Rahmen aus. Bei kurzen Seiten steht sie trotzdem unten,
   siehe die Flex-Regeln am body. */
.admin-fuss {
  margin-left: 236px; padding: 16px 0;
  border-top: 1px solid var(--border);
  transition: margin-left .18s ease;
}
html.leiste-zu .admin-fuss { margin-left: 68px; }
.admin-fuss .container {
  max-width: 1340px;
  padding-left: 20px;
  padding-right: 20px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px 24px; flex-wrap: wrap;
  font-size: .78rem; color: var(--muted);
}
.admin-fuss-wege { display: flex; gap: 18px; flex-wrap: wrap; }
.admin-fuss-wege a { color: var(--muted); text-decoration: none; transition: var(--transition, .2s ease); }
.admin-fuss-wege a:hover { color: var(--gold, #1c6e8c); }
/* Damit die Fusszeile bei kurzen Seiten unten steht: die feste Leiste
   nimmt am Flex nicht teil, uebrig bleiben Inhalt und Fusszeile. */
body.admin { display: flex; flex-direction: column; }
body.admin .admin-inhalt { flex: 1; }

/* Steht NACH der Grundregel: gleiche Spezifitaet, spaeter gewinnt. */
@media (max-width: 940px) {
  .admin-inhalt { margin-left: 0; padding-top: 30px; }
  .admin-inhalt .container { padding-left: 16px; padding-right: 16px; }
  .admin-fuss { margin-left: 0; }
}
/* Mit der Leiste daneben darf der Inhalt breiter laufen als die 1160 der
   Website – sonst bliebe rechts ein toter Streifen. */
.admin-inhalt .container {
  max-width: 1340px;
  padding-left: 20px;
  padding-right: 20px;
}
.admin-inhalt h1 { font-size: 1.75rem; margin: 0 0 6px; }
.admin-inhalt .lead { color: var(--muted); margin: 0 0 32px; font-size: .96rem; }

/* ─── Seitenkopf ─── */

/* Vorher begann jede Seite mit einer fetten Zeile und ging sofort in den
   Inhalt ueber – das las sich wie ein Formular, nicht wie eine Oberflaeche.
   Jetzt derselbe Aufbau wie in den Unterlagen fuer Flo: eine kleine Zeile
   darueber, die sagt worum es geht, der Titel in der Hausschrift, ein Satz
   dazu und ein kurzer Strich in Bordeaux als Abschluss. */
.admin-titel { margin: 0 0 36px; }
.admin-eyebrow {
  font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold, #1c6e8c); margin: 0 0 11px;
}
.admin-inhalt .admin-titel h1 {
  font-family: 'Playfair Display', Georgia, serif; font-weight: 700;
  font-size: clamp(1.9rem, 3.4vw, 2.4rem); line-height: 1.15;
  color: var(--text); margin: 0 0 8px;
}
.admin-inhalt .admin-titel .lead { margin: 0; max-width: 62ch; }
.admin-titel::after {
  content: ''; display: block; width: 56px; height: 2px; border-radius: 2px;
  background: var(--gold, #1c6e8c); margin-top: 20px;
}

/* Abschnitte der Uebersicht: Ueberschrift links, Verweis auf die Unterseite
   rechts – so ist an jeder Gruppe klar, wo es weitergeht. Dazwischen eine
   Haarlinie: sie bindet Ueberschrift und Verweis zu einer Zeile zusammen und
   trennt die Abschnitte sichtbar, ohne dass es nach Tabelle aussieht. */
.ueb-abschnitt { margin-bottom: 52px; }
.ueb-kopf {
  display: flex; align-items: center; gap: 18px; margin-bottom: 18px;
}
.ueb-kopf h2 {
  order: 0; flex: none; margin: 0;
  font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 1.28rem;
}
/* Das Pseudo-Element ist ein eigenes Flex-Kind – deshalb laesst es sich per
   order zwischen Ueberschrift und Verweis schieben. */
.ueb-kopf::before {
  content: ''; order: 1; flex: 1 1 auto; min-width: 20px;
  height: 1px; background: var(--border);
}
.ueb-kopf > a, .ueb-kopf > button, .ueb-kopf > span { order: 2; flex: none; }
.ueb-kopf > span { font-size: .82rem; color: var(--muted); }
.ueb-kopf a { font-size: .85rem; font-weight: 600; color: var(--gold, #1c6e8c); text-decoration: none; white-space: nowrap; }
.ueb-kopf a:hover { text-decoration: underline; }
/* Auf schmalen Schirmen ist fuer die Linie kein Platz mehr – dann lieber
   umbrechen als beides zusammenquetschen. */
@media (max-width: 560px) {
  .ueb-kopf { flex-wrap: wrap; }
  .ueb-kopf::before { display: none; }
  .ueb-kopf > a, .ueb-kopf > button { margin-left: auto; }
}
/* In den Abschnitten sitzt die Ueberschrift der Karte eine Ebene tiefer. */
.ueb-abschnitt .admin-karte h3 { font-size: 1.02rem; margin: 0 0 6px; color: var(--text); }

.admin-karte {
  background: var(--white, #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius, 14px);
  box-shadow: var(--shadow);
  padding: 26px 28px;
}
.admin-karten { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.admin-karte h2 { font-size: 1.05rem; margin: 0 0 6px; }
.admin-karte p { color: var(--muted); font-size: .89rem; line-height: 1.6; margin: 0; }

/* Die Kacheln der Uebersicht sind Links – die ganze Flaeche ist anklickbar,
   nicht nur ein kleines "mehr". */
a.admin-karte { display: block; text-decoration: none; transition: var(--transition, .2s ease); }
a.admin-karte:hover { border-color: var(--gold, #1c6e8c); transform: translateY(-2px); }
a.admin-karte h2 { color: var(--text); }

.admin-pill {
  display: inline-block; font-size: .7rem; font-weight: 600;
  letter-spacing: .03em; padding: 3px 10px; border-radius: 999px;
  margin-bottom: 12px;
}
.admin-pill.bereit { background: #e3f2e9; color: #1d8a52; }
.admin-pill.folgt { background: var(--off, #f0eee9); color: var(--muted); }

/* Nummerierte "was hier hinkommt"-Listen auf den Platzhalterseiten. */
.admin-schritte { list-style: none; margin: 0; padding: 0; counter-reset: schritt; display: flex; flex-direction: column; gap: 18px; }
.admin-schritte li { counter-increment: schritt; display: grid; grid-template-columns: 30px 1fr; gap: 4px 14px; }
.admin-schritte li::before {
  content: counter(schritt); grid-row: 1 / span 2;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--off, #f0eee9); color: var(--gold, #1c6e8c);
  display: flex; align-items: center; justify-content: center;
  font-size: .84rem; font-weight: 700;
}
/* Erledigte Schritte tragen ein Haekchen statt ihrer Nummer – die Liste
   zeigt damit den Fortschritt, nicht nur die Reihenfolge. */
.admin-schritte li.erledigt::before {
  content: "\2713"; background: #e3f2e9; color: #1d8a52; font-size: .95rem;
}
.admin-schritte li.erledigt b { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--border); }
.admin-schritte b { font-size: .94rem; color: var(--text); align-self: center; }
.admin-schritte span { color: var(--muted); font-size: .88rem; line-height: 1.6; }

.mon-text { color: var(--muted); font-size: .9rem; line-height: 1.7; margin: 0; }

/* ─── Monitoring ─── */

.mon-kopfzeile {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 28px;
}
.mon-kopfzeile h1 { margin-bottom: 6px; }
.mon-kopfzeile .lead { margin: 0; }

/* ─── Zeitraumwahl ─── */

/* Frueher eine zweizeilige Leiste aus Datumsfeldern und Pillen – die nahm
   oben so viel Platz ein wie die Ueberschrift selbst, fuer eine Einstellung,
   die man selten aendert. Jetzt ein Knopf, der zeigt was gilt, und eine
   Tafel, die sich nur bei Bedarf oeffnet. */
.zeitwahl { position: relative; }

.zeitwahl-knopf {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--white, #fff); border: 1px solid var(--border);
  border-radius: 999px; padding: 9px 16px;
  font: inherit; font-size: .87rem; color: var(--text); cursor: pointer;
  transition: var(--transition, .2s ease);
  white-space: nowrap;
}
.zeitwahl-knopf:hover { border-color: var(--gold, #1c6e8c); }
.zeitwahl-knopf svg:first-child { color: var(--gold, #1c6e8c); flex: none; }
.zeitwahl-pfeil { color: var(--muted); transition: transform .2s ease; }
.zeitwahl.offen .zeitwahl-pfeil { transform: rotate(180deg); }
.zeitwahl.offen .zeitwahl-knopf { border-color: var(--gold, #1c6e8c); }

.zeitwahl-tafel {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 30;
  min-width: 268px;
  background: var(--white, #fff); border: 1px solid var(--border);
  border-radius: var(--radius, 14px);
  box-shadow: 0 16px 44px rgba(0,0,0,.16);
  padding: 6px;
}
.zeitwahl-tafel[hidden] { display: none; }

/* Voreinstellungen als Zeilen – niemand kaempft mit einem Kalenderraster,
   wenn er "letzte 30 Tage" meint. */
.zeitwahl-reihe {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: .88rem; color: var(--text); text-align: left;
  padding: 9px 12px; border-radius: 9px;
  transition: background .15s ease;
}
.zeitwahl-reihe:hover { background: var(--off, #f5f3ef); }
.zeitwahl-reihe.aktiv { font-weight: 700; }
/* Haken statt Farbflaeche: die Auswahl bleibt auch beim Ueberfahren einer
   anderen Zeile erkennbar. */
.zeitwahl-reihe.aktiv::after {
  content: "✓"; color: var(--gold, #1c6e8c); font-size: 1rem; font-weight: 700;
}

.zeitwahl-frei { border-top: 1px solid var(--border); margin-top: 6px; padding: 14px 12px 10px; }
.zeitwahl-frei-titel {
  margin: 0 0 10px; font-size: .7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
}
.zeitwahl-felder { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 10px; }
.zeitwahl-felder label { font-size: .8rem; color: var(--muted); }
.zeitwahl-felder input[type="date"] {
  width: 100%; font: inherit; font-size: .84rem; color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 9px;
  background: #fff; color-scheme: light;
}
.zeitwahl-felder input[type="date"]:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(28,110,140,.15);
}
.zeitwahl-felder input.fehlt { border-color: var(--gold, #1c6e8c); background: rgba(28,110,140,.05); }

.zeitwahl-anwenden {
  width: 100%; margin-top: 12px;
  border: 0; background: var(--carbon, #15151a); color: #fff;
  font: inherit; font-size: .84rem; cursor: pointer;
  padding: 9px 16px; border-radius: 999px;
  transition: var(--transition, .2s ease);
}
.zeitwahl-anwenden:hover { background: var(--gold, #1c6e8c); }

.mon-laedt { color: var(--muted); }

.mon-kennzahlen {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 22px;
}
.mon-kachel {
  background: var(--white, #fff); border: 1px solid var(--border);
  border-radius: var(--radius, 14px); box-shadow: var(--shadow); padding: 20px 22px;
}
.mon-kachel-titel { margin: 0 0 6px; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.mon-kachel-wert { margin: 0; font-size: 1.9rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--text); }
.mon-kachel-unter { margin: 6px 0 0; font-size: .78rem; color: var(--muted); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }

/* Vergleich zum gleich langen Zeitraum davor. Bewusst mit Pfeil UND Wort –
   Farbe allein waere fuer rot-gruen-schwache Augen keine Information. */
.mon-trend { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mon-trend.hoch   { color: #1d8a52; }
.mon-trend.runter { color: var(--gold, #1c6e8c); }
.mon-trend.gleich { color: var(--muted); font-weight: 600; }

/* Waehrend nachgeladen wird, bleibt die alte Ansicht blass stehen – kein
   Geflacker, kein Sprung in der Seitenhoehe. */
#mon-inhalt.laedt { opacity: .45; transition: opacity .15s ease; }

/* Steht schon der letzte Stand da, wird NICHT abgeblendet – dann liefe ein
   Blaettern zwischen den Seiten auf dasselbe Warten hinaus wie vorher. Statt
   dessen ein duenner Strich am oberen Rand, der sagt: die Zahlen sind da,
   sie werden gerade nur aufgefrischt. Liegt absolut ueber dem Inhalt und
   verschiebt deshalb nichts. */
.wird-frisch { position: relative; }
.wird-frisch::before {
  content: ''; position: absolute; left: 0; right: 0; top: -8px; height: 2px;
  border-radius: 2px; overflow: hidden; z-index: 2;
  background: linear-gradient(90deg,
    transparent 0%, var(--gold, #1c6e8c) 35%, var(--gold, #1c6e8c) 65%, transparent 100%);
  background-size: 45% 100%; background-repeat: no-repeat;
  animation: frisch-lauf 1.1s ease-in-out infinite;
}
@keyframes frisch-lauf {
  0%   { background-position: -45% 0; }
  100% { background-position: 145% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .wird-frisch::before { animation: none; background: var(--border); background-size: 100% 100%; }
}

.mon-block { margin-bottom: 22px; }
.mon-block h2 { font-size: 1.05rem; margin: 0 0 16px; display: flex; align-items: center; gap: 4px; }
.mon-leer { color: var(--muted); font-size: .89rem; margin: 0; }

/* Zwei Karten nebeneinander (Seiten / Herkunft). */
.mon-zwei { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; align-items: start; }
.mon-zwei .mon-block { margin-bottom: 22px; }

/* ─── Info-Punkte ─── */

/* Kleines "i" neben einer Ueberschrift. Zeigt beim Ueberfahren und beim
   Tabben den Zusammenhang – die Zahl allein sagt oft das Falsche. */
.info { position: relative; display: inline-flex; margin-left: 6px; vertical-align: middle; cursor: help; }
.info-zeichen {
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--off, #f0eee9); color: var(--muted);
  font-size: .62rem; font-weight: 700; font-style: italic;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition, .2s ease);
}
.info:hover .info-zeichen, .info:focus .info-zeichen { background: var(--gold, #1c6e8c); color: #fff; }
.info:focus { outline: none; }
.info:focus-visible .info-zeichen { box-shadow: 0 0 0 3px rgba(28,110,140,.25); }

.info-blase {
  position: absolute; bottom: calc(100% + 9px); left: 50%; transform: translateX(-50%);
  width: max-content; max-width: min(300px, 78vw);
  background: var(--carbon, #15151a); color: rgba(255,255,255,.9);
  font-size: .77rem; font-weight: 400; line-height: 1.55; letter-spacing: 0;
  text-transform: none; text-align: left;
  padding: 10px 13px; border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
  opacity: 0; visibility: hidden; transition: opacity .15s ease;
  z-index: 20; pointer-events: none;
}
.info:hover .info-blase, .info:focus .info-blase { opacity: 1; visibility: visible; }

/* Breite Tabelle scrollt in ihrer eigenen Huelle – die Seite selbst nie. */
.mon-tabelle-huelle { overflow-x: auto; }
.mon-tabelle { width: 100%; border-collapse: collapse; font-size: .88rem; }
.mon-tabelle th, .mon-tabelle td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.mon-tabelle th { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.mon-tabelle tbody tr:last-child td { border-bottom: 0; }
.mon-tabelle .num { text-align: right; font-variant-numeric: tabular-nums; }
.mon-tabelle .stark { font-weight: 700; color: var(--text); }
.mon-tabelle .leise { color: var(--muted); }
.mon-tabelle .warn { color: var(--gold, #1c6e8c); font-weight: 700; }

.mon-fussnote { margin: 14px 0 0; font-size: .78rem; line-height: 1.6; color: var(--muted); }
/* Steht unter einer Karte statt darin – deshalb eigener Abstand. */
.mon-fussnote-frei { margin: -8px 4px 22px; }

.mon-balken { display: flex; align-items: flex-end; gap: 6px; height: 150px; overflow-x: auto; padding-bottom: 4px; }
/* max-width, weil bei wenigen Tagen sonst handbreite Bloecke entstehen –
   die lesen sich nicht mehr als Verlauf, sondern als Farbflaeche. */
.mon-balken-spalte {
  flex: 1 0 26px; max-width: 64px;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  height: 100%; gap: 6px;
}
.mon-balken-wert { width: 100%; min-height: 3px; background: var(--gold, #1c6e8c); border-radius: 4px 4px 0 0; }
.mon-balken-tag { font-size: .64rem; color: var(--muted); white-space: nowrap; }

.mon-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mon-liste li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .88rem; }
.mon-liste li:last-child { border-bottom: 0; }
.mon-liste-name { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mon-liste-wert { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ─── Mietflotte pflegen ─── */

/* Drei Zahlen statt eines Satzes. Der Papierkorb ist eine davon und damit
   genauso sichtbar wie der Rest – als Textlink darunter ging er unter. */
/* Eine zusammenhaengende Leiste statt einzelner Pillen: die drei Zahlen
   gehoeren zusammen, und "+ Fahrzeug hinzufügen" gehoert dazu. Getrennt
   werden sie nur durch Haarlinien, der Knopf sitzt am rechten Ende. */
.mf-kpi {
  display: flex; align-items: stretch; flex-wrap: wrap; margin-bottom: 20px;
  background: var(--white, #fff); border: 1px solid var(--border);
  border-radius: 999px; padding: 5px;
}
.mf-kpi-feld {
  display: flex; align-items: baseline; gap: 9px;
  background: none; border: 0; border-radius: 999px; padding: 8px 20px;
  font: inherit; text-align: left;
}
/* Die Trennlinie war ein inset-Schatten – der folgt der Rundung des Feldes
   und wurde dadurch links zum Bogen. Jetzt eine gerade Haarlinie, die oben
   und unten Luft laesst. */
.mf-kpi-feld { position: relative; }
.mf-kpi-feld + .mf-kpi-feld::before {
  content: ''; position: absolute; left: 0; top: 22%; bottom: 22%;
  width: 1px; background: var(--border);
}
.mf-kpi-feld b { font-size: 1.15rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1; }
.mf-kpi-feld span { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--muted); }
.mf-punkt { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.mf-punkt.live { background: #1d8a52; }
.mf-punkt.entwurf { background: var(--border); border: 1px solid var(--muted); }

.mf-kpi-korb { cursor: pointer; transition: var(--transition, .2s ease); }
.mf-kpi-korb:hover:not(:disabled) { background: var(--off, #f5f3ef); }
.mf-kpi-korb:disabled { cursor: default; opacity: .55; }
.mf-kpi-korb svg { transition: transform .2s ease; }
.mf-kpi-korb.offen { background: var(--off, #f5f3ef); }
.mf-kpi-korb.offen span { color: var(--gold, #1c6e8c); }
.mf-kpi-korb.offen svg { transform: rotate(180deg); }

/* Auf schmalen Schirmen untereinander – Haarlinien dann waagerecht. */
@media (max-width: 620px) {
  .mf-kpi { border-radius: var(--radius, 14px); padding: 6px; }
  .mf-kpi-feld { flex: 1 1 100%; }
  .mf-kpi-feld + .mf-kpi-feld::before { left: 12%; right: 12%; top: 0; bottom: auto; width: auto; height: 1px; }
  .mf-kpi-neu { margin: 6px 0 0; width: 100%; justify-content: center; }
}

.mf-kpi-hinweis { margin: -8px 4px 20px; font-size: .82rem; line-height: 1.6; color: var(--muted); }

.mf-karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }

.mf-karte {
  display: flex; flex-direction: column; text-align: left; gap: 0;
  background: var(--white, #fff); border: 1px solid var(--border);
  border-radius: var(--radius, 14px); box-shadow: var(--shadow);
  padding: 0; overflow: hidden; cursor: pointer; font: inherit;
  transition: var(--transition, .2s ease);
}
.mf-karte:hover { border-color: var(--gold, #1c6e8c); transform: translateY(-2px); }

/* Durch die Fotos blaettern, ohne die Kachel zu oeffnen. Gedaempft sichtbar,
   damit erkennbar ist, dass es mehr als ein Bild gibt. */
.mf-blaettern {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 30px; height: 30px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(21,21,26,.55); color: #fff; font-size: 1.2rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  opacity: .45; transition: opacity .18s ease, background .18s ease;
}
.mf-blaettern.zurueck { left: 8px; }
.mf-blaettern.vor { right: 8px; }
.mf-blaettern:hover { background: rgba(21,21,26,.8); }
.mf-karte:hover .mf-blaettern, .mf-blaettern:focus-visible { opacity: 1; }
.mf-karte-fotos {
  position: absolute; right: 10px; bottom: 10px; z-index: 2;
  background: rgba(21,21,26,.72); color: #fff;
  font-size: .68rem; font-weight: 600; padding: 4px 9px; border-radius: 999px;
}

.mf-karte-bild { position: relative; display: block; aspect-ratio: 2 / 1; background: var(--off, #f0eee9); overflow: hidden; }
/* Absolut positioniert, damit das Bild die Hoehe des Kastens NICHT beeinflusst.
   Mit height:100% gegen eine per aspect-ratio berechnete Hoehe zog es die
   Kachel auseinander – Karten mit Bild waren dadurch hoeher als die ohne. */
.mf-karte-bild img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.mf-kein-bild {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  color: var(--muted); font-size: .76rem;
}
.mf-kein-bild svg { width: 34px; height: 34px; opacity: .45; }
.mf-pill {
  position: absolute; top: 10px; left: 10px;
  font-size: .68rem; font-weight: 600; letter-spacing: .02em;
  padding: 4px 10px; border-radius: 999px;
}
.mf-pill.live    { background: #1d8a52; color: #fff; }
.mf-pill.entwurf { background: rgba(21,21,26,.72); color: #fff; }
/* Beispielfahrzeug: sitzt neben dem Online-Stand, deshalb versetzt. */
.mf-pill.muster { left: auto; right: 10px; background: rgba(21,21,26,.72); color: #fff; }

/* Karte als Spalte, damit Preise und Fuss unten stehen – bei
   unterschiedlich vielen Daten sassen sie sonst je Kachel woanders. */
.mf-karte { display: flex; flex-direction: column; }
.mf-karte-text { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.mf-karte-preise { margin-top: auto; }
.mf-karte-text b { display: block; font-size: .98rem; color: var(--text); margin-bottom: 3px; }
.mf-karte-meta { display: block; font-size: .8rem; color: var(--muted); margin-bottom: 12px; }
.mf-karte-preise { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-top: 1px solid var(--border); padding-top: 11px; }
.mf-karte-preise span { display: flex; flex-direction: column; gap: 2px; font-size: .88rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.mf-karte-preise i { font-style: normal; font-weight: 400; font-size: .67rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
/* Abgeleiteter Preis: der Kunde sieht ihn, hinterlegt ist er nicht. */
.mf-karte-preise span.berechnet { color: var(--muted); font-weight: 600; }

/* Kategorie unten rechts im Bild – oben links sitzt schon der Online-Stand. */
.mf-karte-kat {
  position: absolute; right: 10px; bottom: 10px;
  font-size: .68rem; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,.92); color: var(--text);
}
/* Dieselben Daten wie die Karte auf der Mietwagenseite. */
.mf-karte-specs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 12px; margin: 10px 0 12px;
}
.mf-karte-specs span {
  display: flex; flex-direction: column; gap: 1px;
  font-size: .82rem; color: var(--text); min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Wie auf der Website: die Bezeichnung traegt mehr Gewicht als der Wert. */
.mf-karte-specs i {
  font-style: normal; font-weight: 700; font-size: .64rem; text-transform: uppercase;
  letter-spacing: .04em; color: var(--muted);
}
.mf-karte-hinweis {
  display: block; margin: 4px 0 12px; font-size: .78rem; color: var(--muted);
  font-style: italic; line-height: 1.5;
}
.mf-karte-fuss {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--border);
}
.mf-karte-ab {
  display: flex; flex-direction: column; gap: 1px;
  font-size: 1.02rem; font-weight: 700; color: var(--gold, #1c6e8c);
  font-variant-numeric: tabular-nums;
}
.mf-karte-ab i { font-style: normal; font-size: .66rem; font-weight: 400; color: var(--muted); text-transform: none; letter-spacing: 0; }
.mf-karte-knopf {
  font: inherit; font-size: .8rem; font-weight: 600; color: var(--text);
  background: none; cursor: pointer;
  border: 1px solid var(--border); border-radius: 999px; padding: 7px 15px;
  transition: var(--transition, .2s ease);
}
.mf-karte:hover .mf-karte-knopf { border-color: var(--gold, #1c6e8c); color: var(--gold, #1c6e8c); }

/* ─── Anfragen ─── */
.mf-anfragen { margin-bottom: 40px; }
.mf-anfragen[hidden] { display: none; }
.mf-anfragen-zahl { font-size: .84rem; color: var(--muted); }
.mf-anfragen-zahl.hat-neue { color: var(--gold, #1c6e8c); font-weight: 600; }

/* Klappbare Tabelle: eine Zeile je Eintrag, Einzelheiten auf Klick.
   Bei vielen Eintraegen bleibt so der Ueberblick, ohne dass etwas fehlt. */
.mf-tab {
  background: var(--white, #fff); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
}
.mf-tab-zeile + .mf-tab-zeile { border-top: 1px solid var(--border); }
.mf-tab-zeile.neu { box-shadow: inset 3px 0 0 var(--gold, #1c6e8c); }
.mf-tab-kopf {
  width: 100%; display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap;
  border: 0; background: none; font: inherit; text-align: left; cursor: pointer;
  padding: 12px 16px; color: var(--text);
}
.mf-tab-kopf:hover { background: var(--off, #f5f3ef); }
.mf-tab-fz { font-weight: 600; font-size: .92rem; }
.mf-tab-zeit { font-size: .86rem; color: var(--text); font-variant-numeric: tabular-nums; }
.mf-tab-name { font-size: .86rem; color: var(--muted); }
.mf-tab-pfeil { margin-left: auto; color: var(--muted); display: flex; transition: transform .2s ease; }
.mf-tab-kopf[aria-expanded="true"] .mf-tab-pfeil { transform: rotate(180deg); }
.mf-tab-detail { padding: 0 16px 14px; }
.mf-tab-detail[hidden] { display: none; }

/* Seitenwahl unter langen Listen. Blaettern statt Aufklappen: wer einen
   bestimmten Eintrag sucht, ist mit Seiten schneller als mit Scrollen. */
.blatt { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 24px; }
.blatt button {
  min-width: 32px; height: 32px; padding: 0 9px; cursor: pointer; font: inherit;
  font-size: .84rem; color: var(--text); font-variant-numeric: tabular-nums;
  background: var(--white, #fff); border: 1px solid var(--border);
  border-radius: 8px; transition: var(--transition, .2s ease);
}
.blatt button:hover:not(:disabled):not(.hier) { border-color: var(--gold, #1c6e8c); color: var(--gold, #1c6e8c); }
.blatt button.hier { background: var(--gold, #1c6e8c); border-color: var(--gold, #1c6e8c); color: #fff; font-weight: 700; }
.blatt button:disabled { opacity: .35; cursor: default; }
.blatt-luecke { color: var(--muted); padding: 0 2px; }

/* Kleiner Trenner zwischen Kalender und Einzeleintraegen. */
.mf-untertitel {
  font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); margin: 26px 0 12px;
}

.mf-anfrage-neu {
  font-size: .7rem; font-weight: 700; letter-spacing: .03em;
  background: var(--gold, #1c6e8c); color: #fff; padding: 2px 9px; border-radius: 999px;
}
.mf-anfrage-nr, .mf-anfrage-ein { font-size: .76rem; color: var(--muted); }
.mf-anfrage-ein { margin-left: auto; }
.mf-anfrage-kontakt { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: .86rem; color: var(--text); }
.mf-anfrage-kontakt a { color: var(--gold, #1c6e8c); text-decoration: none; }
.mf-anfrage-kontakt a:hover { text-decoration: underline; }
.mf-anfrage-text {
  margin: 9px 0 0; font-size: .86rem; color: var(--muted);
  line-height: 1.6; white-space: pre-wrap;
}
.mf-anfrage-knoepfe { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.mf-anfrage-knoepfe button {
  font: inherit; font-size: .8rem; border: 1px solid var(--border);
  background: #fff; border-radius: 999px; padding: 6px 14px; cursor: pointer; color: var(--text);
}
.mf-anfrage-knoepfe button:hover { border-color: var(--gold, #1c6e8c); color: var(--gold, #1c6e8c); }

/* Bearbeiten-Tafel */
.mf-schicht {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(21,21,26,.55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 24px; overflow-y: auto;
}
.mf-schicht[hidden] { display: none; }

.mf-tafel {
  width: 100%; max-width: 620px;
  background: var(--white, #fff); border-radius: var(--radius, 14px);
  box-shadow: 0 24px 70px rgba(0,0,0,.4);
  margin: auto;
}
.mf-tafel-kopf {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.mf-tafel-kopf h2 { font-size: 1.15rem; margin: 0; }
.mf-schliessen {
  border: 0; background: none; cursor: pointer; font-size: 1.1rem;
  color: var(--muted); padding: 4px 8px; border-radius: 8px; line-height: 1;
}
.mf-schliessen:hover { color: var(--gold, #1c6e8c); background: var(--off, #f5f3ef); }

#mf-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; padding: 22px 24px 24px; }
.mf-feld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.mf-feld.voll { grid-column: 1 / -1; }
.mf-feld label { font-size: .78rem; font-weight: 600; color: var(--text); }
.mf-feld input[type="text"], .mf-feld input[type="number"], .mf-feld select {
  width: 100%; font: inherit; font-size: .9rem; color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 11px;
  background: #fff; color-scheme: light;
}
.mf-feld input:focus, .mf-feld select:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(28,110,140,.15);
}
.mf-notiz { font-size: .74rem; color: var(--muted); line-height: 1.55; }
.mf-notiz code { background: var(--off, #f0eee9); padding: 1px 5px; border-radius: 4px; font-size: .95em; }

/* Bilder in der Bearbeiten-Tafel */
.mf-galerie { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.mf-galerie-leer { margin: 0; font-size: .82rem; color: var(--muted); }

.mf-bild {
  position: relative; width: 116px; aspect-ratio: 2 / 1; overflow: hidden;
  border: 1px solid var(--border); border-radius: 8px; background: var(--off, #f0eee9);
}
.mf-bild.titel { border-color: var(--gold, #1c6e8c); }
.mf-bild img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mf-bild-marke {
  position: absolute; left: 0; bottom: 0; z-index: 1;
  background: var(--gold, #1c6e8c); color: #fff;
  font-size: .62rem; font-weight: 600; padding: 2px 7px; border-top-right-radius: 6px;
}
.mf-bild-aktionen { position: absolute; top: 4px; right: 4px; z-index: 1; display: flex; gap: 4px; }
.mf-bild-aktionen button {
  border: 0; cursor: pointer; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(21,21,26,.72); color: #fff; font-size: .7rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition, .2s ease);
}
.mf-bild-aktionen button:hover { background: var(--gold, #1c6e8c); }

.mf-bild-knoepfe { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; min-width: 0; }
/* Das echte Dateifeld ist versteckt – der Browser-Standardknopf laesst sich
   nicht gestalten und heisst je nach Spracheinstellung anders.
   WICHTIG: als label.… geschrieben, weil ".mf-feld label" sonst mit hoeherer
   Spezifitaet gewinnt und die Schrift dunkel faerbt – dunkel auf dunkel. */
.mf-feld label.mf-datei-knopf {
  display: inline-block; cursor: pointer;
  font-size: .84rem; font-weight: 600; color: #fff;
  background: var(--carbon, #15151a);
  padding: 8px 16px; border-radius: 999px;
  transition: var(--transition, .2s ease);
}
.mf-feld label.mf-datei-knopf:hover { background: var(--gold, #1c6e8c); }

.mf-abschnitt {
  grid-column: 1 / -1; margin: 8px 0 -4px;
  font-size: .7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted);
}

.mf-schalter { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: .9rem; font-weight: 600; }
.mf-schalter input { width: 17px; height: 17px; accent-color: var(--gold, #1c6e8c); }

.mf-fehler {
  grid-column: 1 / -1; margin: 0;
  background: rgba(28,110,140,.08); border: 1px solid rgba(28,110,140,.28);
  color: var(--gold, #1c6e8c); border-radius: 8px; padding: 10px 13px; font-size: .85rem;
}
.mf-fehler[hidden] { display: none; }

.mf-tafel-fuss {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 18px;
}
.mf-tafel-knoepfe { display: flex; gap: 10px; margin-left: auto; }
.mf-loeschen {
  border: 0; background: none; cursor: pointer; font: inherit; font-size: .84rem;
  color: var(--muted); text-decoration: underline; padding: 8px 0;
}
.mf-loeschen:hover { color: var(--gold, #1c6e8c); }
.mf-loeschen[hidden] { display: none; }

/* Papierkorb-Inhalt */
#mf-korb {
  background: var(--off, #f0eee9); border: 1px solid var(--border);
  border-radius: var(--radius, 14px); padding: 18px 20px 14px; margin-bottom: 22px;
}
#mf-korb[hidden] { display: none; }
.mf-korb-titel { font-size: .95rem; margin: 0 0 14px; }

.mf-korb-zeile {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--white, #fff); border: 1px solid var(--border);
  border-radius: 10px; padding: 13px 18px; margin-bottom: 10px;
}
.mf-korb-name { font-weight: 600; color: var(--text); font-size: .92rem; }
.mf-korb-wann { display: block; font-weight: 400; font-size: .76rem; color: var(--muted); margin-top: 2px; }
.mf-korb-knoepfe { display: flex; gap: 8px; margin-left: auto; }
.mf-korb-knoepfe button {
  border: 1px solid var(--border); background: #fff; cursor: pointer;
  font: inherit; font-size: .82rem; padding: 7px 14px; border-radius: 999px;
  transition: var(--transition, .2s ease);
}
.mf-korb-zurueck { color: var(--text); }
.mf-korb-zurueck:hover { border-color: #1d8a52; color: #1d8a52; }
.mf-korb-weg { color: var(--muted); }
.mf-korb-weg:hover { border-color: var(--gold, #1c6e8c); color: var(--gold, #1c6e8c); }

@media (max-width: 560px) {
  #mf-form { grid-template-columns: 1fr; }
  .mf-schicht { padding: 12px; }
  .mf-tafel-knoepfe { width: 100%; }
  .mf-tafel-knoepfe .btn { flex: 1; justify-content: center; }
}

/* ─── Liniendiagramm Besucherverlauf ─── */

.viz-legende { display: flex; gap: 20px; margin: -6px 0 12px; font-size: .8rem; color: var(--muted); }
.viz-legende span { display: inline-flex; align-items: center; gap: 7px; }
/* Linienschluessel, nicht Kaestchen – die Reihen sind Linien. */
.viz-legende i { width: 16px; height: 3px; border-radius: 2px; }

.viz { position: relative; width: 100%; }
.viz-svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.viz-raster { stroke: var(--border); stroke-width: 1; }
.viz-achse { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.viz-linie { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
/* Weisser Ring, damit sich der Endpunkt vom Raster abhebt. */
.viz-ende, .viz-treffer { stroke: #fff; stroke-width: 2; }
.viz-faden { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
/* SVG-Elemente erben die hidden-Regel des Browsers nicht zuverlaessig – ohne
   das hier stehen Faden und Trefferpunkte beim Laden sichtbar am linken Rand. */
.viz-svg [hidden] { display: none; }
#viz-fang { cursor: crosshair; }

.viz-blase {
  position: absolute; top: 4px; transform: translateX(-50%);
  background: var(--carbon, #15151a); color: #fff;
  padding: 9px 12px; border-radius: 10px;
  font-size: .78rem; line-height: 1.5;
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
  pointer-events: none; white-space: nowrap; z-index: 5;
}
/* Am rechten Rand nach links kippen, sonst steht die Blase ausserhalb. */
.viz-blase.links { transform: translateX(-100%) translateX(-10px); }
.viz-blase p { margin: 0; }
.viz-blase-tag { color: rgba(255,255,255,.6); font-size: .72rem; margin-bottom: 5px !important; }
.viz-blase-zeile { display: flex; align-items: center; gap: 7px; }
.viz-blase-zeile i { width: 12px; height: 3px; border-radius: 2px; flex: none; }
.viz-blase-zeile b { font-variant-numeric: tabular-nums; }

.mon-fehler { border-color: rgba(28,110,140,.3); }
.mon-fehler h2 { color: var(--gold, #1c6e8c); }
.mon-fehler p { color: var(--muted); font-size: .86rem; line-height: 1.6; margin: 0; word-break: break-word; }

@media (max-width: 640px) {
  /* Untereinander gestapelt war der Kopf 190px hoch: die Navigation brach auf
     zwei Zeilen um und "Abmelden" bekam eine dritte. Stattdessen zwei Zeilen –
     Marke und Abmelden nebeneinander, darunter die Navigation in EINER Zeile,
     die man bei Bedarf seitlich wischt. */
  .admin-kopf .container {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px 12px;
  }
  .admin-marke { grid-column: 1; grid-row: 1; }
  .admin-kopf form { grid-column: 2; grid-row: 1; justify-self: end; }
  .admin-kopf nav {
    grid-column: 1 / -1; grid-row: 2;
    flex-wrap: nowrap; gap: 4px;
    overflow-x: auto; scrollbar-width: none;
  }
  .admin-kopf nav::-webkit-scrollbar { display: none; }
  .admin-kopf nav a { padding: 6px 11px; font-size: .82rem; white-space: nowrap; }

  /* Auf dem Handy nimmt der Knopf die volle Breite, und die Tafel spannt sich
     ueber beide Raender statt rechts zu kleben – sonst waere sie schmaler als
     ihr eigener Inhalt. */
  .mon-kopfzeile { flex-direction: column; align-items: stretch; }
  .zeitwahl-knopf { width: 100%; justify-content: center; }
  .zeitwahl-tafel { left: 0; right: 0; min-width: 0; }

  .login-karte { padding: 32px 24px 26px; }
}

/* Leiste ueber den Flottenkarten: Anzahl links, Sortierung rechts – wie in
   der Fahrzeug-Galerie auf der Website, damit es sich gleich anfuehlt. */
.mf-leiste {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  /* Ohne den unteren Rand klebt die Leiste auf der Liste darunter. */
  margin: 0 0 16px;
  font-size: .86rem; color: var(--muted);
}
.mf-leiste[hidden], .mf-sort-wrap[hidden] { display: none; }
/* Ansicht und Sortierung rechts, die Anzahl bleibt links. */
.mf-leiste-rechts { margin-left: auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.mf-ansicht { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--white, #fff); }
.mf-ansicht button {
  border: 0; background: none; cursor: pointer; font: inherit;
  font-size: .82rem; color: var(--muted); padding: 7px 15px;
  transition: var(--transition, .2s ease);
}
.mf-ansicht button:hover { color: var(--text); }
.mf-ansicht button[aria-pressed="true"] { background: var(--gold, #1c6e8c); color: #fff; font-weight: 600; }

/* Listenansicht der Flotte: dieselben Angaben wie die Kachel, eine Zeile hoch. */
.mf-fz-tab { background: var(--white, #fff); border: 1px solid var(--border); border-radius: var(--radius, 12px); overflow: hidden; }
.mf-zeile {
  width: 100%; display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap;
  border: 0; background: none; font: inherit; text-align: left; cursor: pointer;
  padding: 10px 16px; color: var(--text);
}
.mf-zeile + .mf-zeile { border-top: 1px solid var(--border); }
.mf-zeile:hover { background: var(--off, #f5f3ef); }
.mf-zeile-bild {
  position: relative; flex: none; width: 72px; height: 48px; border-radius: 7px;
  overflow: hidden; background: var(--off, #f0eee9);
}
.mf-zeile-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mf-zeile-kein-bild { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.mf-zeile-kein-bild svg { width: 24px; height: 24px; opacity: .45; }
.mf-zeile-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 180px; }
.mf-zeile-text b { font-size: .94rem; }
.mf-zeile-text i { font-style: normal; font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf-zeile-preis { display: flex; flex-direction: column; gap: 1px; font-size: .92rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.mf-zeile-preis i { font-style: normal; font-size: .66rem; font-weight: 400; color: var(--muted); }
/* In der Zeile sind die Pillen nicht absolut gesetzt wie ueber dem Bild. */
.mf-zeile .mf-pill.mf-zeile-stand { position: static; }
.mf-zeile-pfeil { color: var(--muted); font-size: 1.2rem; line-height: 1; }
/* Die Ueberschrift "Fahrzeuge" traegt Anzahl und Sortierung mit – beides
   gehoert zu den Karten darunter, nicht an den Seitenanfang. */
.mf-fz-kopf { align-items: center; }
.mf-sort-wrap { display: inline-flex; align-items: center; gap: 8px; }
.mf-sort-wrap select {
  font: inherit; font-size: .84rem; color: var(--text);
  background: var(--white, #fff); border: 1px solid var(--border);
  border-radius: 999px; padding: 7px 13px; cursor: pointer; color-scheme: light;
}
.mf-sort-wrap select:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(28,110,140,.15);
}

/* "Fahrzeug hinzufuegen" sitzt in derselben Leiste wie die drei Zahlen –
   getrennt durch den automatischen Rand, damit klar bleibt, dass er eine
   Handlung ist und keine Kennzahl. */
/* Auf der Mietwagenseite ein <button>, auf der Uebersicht ein Verweis auf
   ebendiese Seite – beide sollen gleich aussehen. */
.mf-kpi-neu {
  margin-left: auto; border: 0; cursor: pointer; font: inherit;
  display: inline-flex; align-items: center; text-decoration: none;
  font-size: .84rem; font-weight: 600; color: #fff;
  background: var(--gold, #1c6e8c);
  padding: 9px 18px; border-radius: 999px;
  transition: var(--transition, .2s ease);
}
.mf-kpi-neu:hover { background: var(--carbon, #15151a); }
@media (max-width: 560px) { .mf-kpi-neu { margin-left: 0; width: 100%; } }

/* ─── Belegung ─── */
.mf-bel { margin-bottom: 36px; }
/* Gleiche Handlung, gleiches Aussehen wie "+ Fahrzeug hinzufügen". */
.mf-bel-neu {
  border: 0; background: var(--gold, #1c6e8c); cursor: pointer;
  font: inherit; font-size: .86rem; font-weight: 600; color: #fff;
  padding: 10px 20px; border-radius: 999px; transition: var(--transition, .2s ease);
}
.mf-bel-neu:hover { background: var(--carbon, #15151a); }

/* Belegungskalender: eine Zeile je Fahrzeug, eine Spalte je Tag.
   Die Farbe steht hier fuer "belegt", nicht fuer gut oder schlecht –
   deshalb Bordeaux statt Gruen, mit Legende darueber. */
.mf-kal {
  background: var(--white, #fff); border: 1px solid var(--border);
  border-radius: var(--radius, 12px); padding: 14px 16px 16px; margin-bottom: 16px;
}
.mf-kal-kopf {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px 20px; flex-wrap: wrap; margin-bottom: 12px;
}
.mf-kal-monatswahl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* Nur die unmittelbaren Knoepfe der Leiste – die Umschalter fuer Jahr, Monat
   und Woche stecken eine Ebene tiefer und haetten sonst die runde Pfeilform
   samt fester Breite von 30 Pixeln bekommen. */
.mf-kal-monatswahl > button {
  font: inherit; line-height: 1; cursor: pointer; color: var(--text);
  border: 1px solid var(--border); background: var(--white, #fff);
  border-radius: 999px; transition: var(--transition, .2s ease);
}
.mf-kal-monatswahl > button:not(.mf-kal-heute) { width: 30px; height: 30px; font-size: 1.15rem; }
.mf-kal-heute { font-size: .78rem; padding: 7px 13px; margin-left: 4px; }
.mf-kal-monatswahl > button:hover { border-color: var(--gold, #1c6e8c); color: var(--gold, #1c6e8c); }
.mf-kal-monatswahl strong {
  min-width: 9.5em; text-align: center; font-size: .95rem; color: var(--text);
}
.mf-kal-legende {
  display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap;
  font-size: .78rem; color: var(--muted);
}
.mf-kal-punkt {
  display: inline-block; width: 11px; height: 11px; border-radius: 3px;
  margin-right: 6px; vertical-align: -1px;
}
.mf-kal-punkt.bestaetigt { background: var(--gold, #1c6e8c); }
.mf-kal-punkt.angefragt {
  background: repeating-linear-gradient(45deg, #d99a2b 0 4px, #e9bd6a 4px 8px);
}
.mf-kal-tipp { font-style: italic; }
/* Der Bedienhinweis steht unter dem Gitter, nicht in der Legende – und
   rechtsbuendig, damit er die Fahrzeugnamen links nicht stoert. */
.mf-kal-tipp-zeile { margin: 12px 0 0; font-size: .78rem; color: var(--muted); text-align: right; }
.mf-kal-tipp.tipp-tippen { display: none; }
@media (pointer: coarse) {
  .mf-kal-tipp { display: none; }
  .mf-kal-tipp.tipp-tippen { display: inline; }
}

#mf-kal-gitter { overflow-x: auto; }
.mf-kal-tabelle {
  display: grid;
  grid-template-columns: 134px repeat(var(--tage), minmax(24px, 1fr));
  gap: 2px;
  min-width: calc(134px + var(--tage) * 26px);
  user-select: none; -webkit-user-select: none;
}
.mf-kal-ecke, .mf-kal-name {
  position: sticky; left: 0; z-index: 2; background: var(--white, #fff);
}
.mf-kal-name {
  font-size: .8rem; font-weight: 600; color: var(--text);
  line-height: 32px; padding-right: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mf-kal-kopftag {
  text-align: center; font-size: .72rem; color: var(--muted);
  padding-bottom: 5px; line-height: 1.2; font-variant-numeric: tabular-nums;
}
.mf-kal-kopftag span {
  display: block; font-size: .58rem; text-transform: uppercase;
  letter-spacing: .04em; opacity: .7;
}
.mf-kal-kopftag.heute { color: var(--gold, #1c6e8c); font-weight: 700; }

.mf-kal-tag { height: 32px; border-radius: 5px; background: #f1efea; }
.mf-kal-tag.we { background: #e6e1d8; }
.mf-kal-tag.frei { cursor: cell; }
.mf-kal-tag.frei:hover { background: rgba(168, 50, 61, .16); }
.mf-kal-tag.belegt { border-radius: 0; cursor: default; background: var(--gold, #1c6e8c); }
.mf-kal-tag.belegt.angefragt {
  background: repeating-linear-gradient(45deg, #d99a2b 0 5px, #e9bd6a 5px 10px);
}
.mf-kal-tag.belegt.anfang { border-top-left-radius: 5px; border-bottom-left-radius: 5px; }
.mf-kal-tag.belegt.ende { border-top-right-radius: 5px; border-bottom-right-radius: 5px; }
.mf-kal-tag.heute { outline: 1px dashed rgba(21, 21, 26, .45); outline-offset: -1px; }
/* Zeigt man in der Liste auf einen Termin, wird sein Block im Kalender zum
   Scheinwerferkegel: er wird heller, hebt sich leicht an und bekommt einen
   hellen Ring – und alles andere tritt zurueck. Ein blosser Rahmen ging auf
   den bordeauxfarbenen Tagen unter. */
.mf-kal-tag, .mf-jahr-zelle {
  transition: opacity .15s ease, transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.mf-kal-fokus .mf-kal-tag:not(.hervor),
.mf-kal-fokus .mf-jahr-zelle:not(.hervor) { opacity: .25; }
.mf-kal-fokus .mf-kal-name { opacity: .55; }

.mf-kal-tag.hervor, .mf-jahr-zelle.hervor {
  position: relative; z-index: 3;
  filter: brightness(1.3) saturate(1.05);
  transform: translateY(-2px);
  box-shadow: 0 0 0 2px var(--white, #fff), 0 0 0 4px var(--carbon, #15151a),
              0 8px 20px rgba(21,21,26,.3);
}
/* Freie Tage haben kaum Farbe, die brightness allein nicht heller macht. */
.mf-kal-tag.frei.hervor { background: var(--gold, #1c6e8c); opacity: .55; }

@media (prefers-reduced-motion: reduce) {
  .mf-kal-tag, .mf-jahr-zelle { transition: none; }
  .mf-kal-tag.hervor, .mf-jahr-zelle.hervor { transform: none; }
}

.mf-kal-tag.waehlt {
  background: rgba(168, 50, 61, .55);
  box-shadow: inset 0 0 0 1px var(--gold, #1c6e8c);
}
@media (max-width: 560px) {
  .mf-kal { padding: 12px 12px 14px; }
  .mf-kal-tabelle { grid-template-columns: 104px repeat(var(--tage), minmax(24px, 1fr)); }
  .mf-kal-tabelle { min-width: calc(104px + var(--tage) * 26px); }
}

.mf-bel-zeile {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--white, #fff); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 16px; margin-bottom: 9px;
  transition: border-color .15s ease;
}
/* Die Zeile faerbt beim Zeigen mit – der Kalender oben leuchtet dann auch. */
.mf-bel-zeile:hover, .mf-bel-zeile:focus-within { border-color: var(--carbon, #15151a); }
.mf-bel-nr { font-size: .78rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.mf-bel-fz { font-weight: 600; font-size: .92rem; color: var(--text); }
.mf-bel-zeit { font-size: .86rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.mf-bel-notiz { font-size: .8rem; color: var(--muted); font-style: italic; }
.mf-bel-stand {
  font-size: .74rem; font-weight: 600; padding: 3px 10px; border-radius: 999px;
}
.mf-bel-stand.angefragt  { background: #fdf3e3; color: #8a5a12; }
.mf-bel-stand.bestaetigt { background: #e3f2e9; color: #1d8a52; }
.mf-bel-stand.abgesagt   { background: var(--off, #f0eee9); color: var(--muted); }
.mf-bel-stand.erledigt   { background: var(--off, #f0eee9); color: var(--muted); }
.mf-bel-aktionen { display: flex; gap: 6px; margin-left: auto; }
.mf-bel-aktionen select, .mf-bel-aktionen button {
  font: inherit; font-size: .8rem; border: 1px solid var(--border);
  background: #fff; border-radius: 999px; padding: 6px 12px; cursor: pointer; color-scheme: light;
}
.mf-bel-aktionen button:hover { border-color: var(--gold, #1c6e8c); color: var(--gold, #1c6e8c); }
.mf-tafel-schmal { max-width: 460px; }
#mf-bel-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; padding: 22px 24px 24px; }
#mf-bel-form select, #mf-bel-form input[type="date"],
#mf-bel-form input[type="time"], #mf-bel-form input[type="text"] {
  width: 100%; font: inherit; font-size: .9rem; color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 11px;
  background: #fff; color-scheme: light;
}
#mf-bel-form select:focus, #mf-bel-form input:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(28,110,140,.15);
}
@media (max-width: 460px) { #mf-bel-form { grid-template-columns: 1fr; } }

/* ─── Rueckfrage ───
   Eigene Maske statt window.confirm: das Browserfenster laesst sich nicht
   gestalten und wirkt neben der uebrigen Oberflaeche wie ein Fremdkoerper.
   Aufgebaut wie die anderen Tafeln im Adminbereich. */
.frage-schicht {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(21,21,26,.55);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.frage-tafel {
  width: 100%; max-width: 400px;
  background: var(--white, #fff); border-radius: var(--radius, 14px);
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  padding: 26px 26px 22px;
}
.frage-tafel h2 { font-size: 1.1rem; margin: 0 0 8px; color: var(--text); }
.frage-tafel p { margin: 0 0 22px; font-size: .9rem; line-height: 1.6; color: var(--muted); }
.frage-knoepfe { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.frage-knoepfe button {
  font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer;
  padding: 10px 20px; border-radius: 999px; transition: var(--transition, .2s ease);
}
.frage-nein { border: 1px solid var(--border); background: var(--white, #fff); color: var(--text); }
.frage-nein:hover { border-color: var(--carbon, #15151a); }
/* Der Loeschknopf traegt die Warnfarbe – aber nicht den Fokus, siehe
   gemeinsam.js: ein versehentliches Enter soll nichts entfernen. */
.frage-ja { border: 0; background: var(--gold, #1c6e8c); color: #fff; }
.frage-ja:hover { background: var(--carbon, #15151a); }

/* Kleines Monitoring unter der Ueberschrift der Mietwagenseite: Datum,
   die Zahlen des Tages und der naechste Termin. */
.mf-monitor { margin: 8px 0 0; }

/* Kopf der Mietwagenseite: Titel links, Monitorkachel rechts. Der Titel
   behaelt eine feste Spur, die Kachel bekommt den Rest. Unter 1200 px
   stapeln sich beide wieder – der Kachel wird es sonst zu eng. */
.mf-seitenkopf {
  display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 18px 40px; align-items: start; margin-bottom: 26px;
}
.mf-seitenkopf .admin-titel { margin-bottom: 0; }
.mf-seitenkopf .mf-monitor { margin-top: 0; padding: 16px 20px 18px; }
/* Der Strich unterm Titel darf hier enger sitzen – die Kachel daneben gibt
   die Hoehe vor, jeder gesparte Punkt zieht die Reiter mit nach oben. */
.mf-seitenkopf .admin-titel::after { margin-top: 18px; }

/* Kopf und Reiterleiste sind EIN Raster: die Kachel reicht ueber beide
   Zeilen und endet damit genau dort, wo die Reiter enden. Vorher stand die
   Leiste unter dem Kopf, und rechts neben ihr blieb die Kachelhoehe als
   Luecke stehen. */
.mf-seitenkopf {
  grid-template-rows: auto auto;
  align-items: start;
}
.mf-seitenkopf .admin-titel { grid-column: 1; grid-row: 1; }
.mf-seitenkopf .mf-reiter { grid-column: 1; grid-row: 2; align-self: end; margin: 10px 0 0; }
.mf-seitenkopf .mf-monitor { grid-column: 2; grid-row: 1 / span 2; align-self: stretch; }
/* Die Kachel waechst auf die Hoehe der linken Spalte. Der Rest bleibt
   unten – als Polster gelesen, nicht als Loch: den Inhalt auseinander zu
   ziehen riss eine Luecke mitten hinein. */

@media (max-width: 1200px) {
  .mf-seitenkopf { grid-template-columns: 1fr; grid-template-rows: none; }
  .mf-seitenkopf .admin-titel,
  .mf-seitenkopf .mf-reiter,
  .mf-seitenkopf .mf-monitor { grid-column: 1; grid-row: auto; }
  .mf-seitenkopf .mf-monitor { margin-top: 8px; }
  .mf-seitenkopf .mf-reiter { margin-top: 6px; }
}
.mf-mon-datum { color: var(--muted); font-size: .88rem; }
.mf-mon-felder {
  display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 10px 0 0;
}
.mf-mon-felder span {
  display: inline-flex; align-items: baseline; gap: 5px;
  background: var(--white, #fff); border: 1px solid var(--border);
  border-radius: 999px; padding: 7px 15px;
  font-size: .82rem; color: var(--muted);
}
.mf-mon-felder b {
  font-size: 1rem; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.mf-mon-naechst { margin: 10px 0 0; font-size: .88rem; color: var(--muted); }
.mf-mon-naechst b { color: var(--text); }
.mf-mon-offen {
  margin-left: 6px; font-size: .7rem; font-weight: 600;
  background: #fdf3e3; color: #8a5a12; padding: 2px 9px; border-radius: 999px;
}

/* ─── Kalender: Jahr und Woche ───
   Der Monat bleibt die fuehrende Ansicht; das Jahr zeigt, wann viel los ist,
   die Woche hat Platz fuer die Uhrzeiten. */
.mf-kal-ansicht {
  display: inline-flex; margin-left: 8px; overflow: hidden;
  border: 1px solid var(--border); border-radius: 999px; background: var(--white, #fff);
}
.mf-kal-ansicht button {
  border: 0; background: none; cursor: pointer; font: inherit;
  font-size: .8rem; color: var(--muted); padding: 6px 13px;
  transition: var(--transition, .2s ease);
}
.mf-kal-ansicht button:hover { color: var(--text); }
.mf-kal-ansicht button[aria-pressed="true"] { background: var(--gold, #1c6e8c); color: #fff; font-weight: 600; }

/* Jahresraster: Zeile je Fahrzeug, Spalte je Monat, Zahl der belegten Tage.
   Die Faerbung richtet sich nach dem Anteil – so sieht man die Saison. */
.mf-jahr {
  display: grid; grid-template-columns: 134px repeat(12, minmax(46px, 1fr));
  gap: 3px; min-width: 700px;
}
.mf-jahr-kopf {
  text-align: center; font-size: .72rem; color: var(--muted); padding-bottom: 5px;
}
.mf-jahr-kopf.heute { color: var(--gold, #1c6e8c); font-weight: 700; }
.mf-jahr-zelle {
  height: 34px; border: 0; border-radius: 6px; cursor: pointer; font: inherit;
  font-size: .8rem; font-variant-numeric: tabular-nums; color: var(--text);
  background: #f1efea; transition: var(--transition, .2s ease);
}
.mf-jahr-zelle.hat {
  /* Anteil belegter Tage -> Deckkraft. Mindestens 0.25, damit ein einzelner
     Tag nicht unsichtbar bleibt. */
  background: rgba(168, 50, 61, calc(0.25 + var(--anteil) * 0.75));
  color: #fff; font-weight: 600;
}
.mf-jahr-zelle:hover { outline: 2px solid var(--gold, #1c6e8c); outline-offset: -2px; }

/* Wochenansicht: breitere Spalten, damit die Uhrzeiten hineinpassen. */
#mf-kal-gitter[data-ansicht="woche"] .mf-kal-tabelle {
  grid-template-columns: 134px repeat(var(--tage), minmax(90px, 1fr));
  min-width: calc(134px + var(--tage) * 92px);
}
#mf-kal-gitter[data-ansicht="woche"] .mf-kal-tag { height: 46px; }
#mf-kal-gitter[data-ansicht="woche"] .mf-kal-tag.belegt {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; color: #fff; font-size: .68rem; font-weight: 600;
}
#mf-kal-gitter[data-ansicht="woche"] .mf-kal-kopftag { font-size: .78rem; }



/* ─── Kopfbereich der Mietwagenseite ─── */
/* Der Kopfbereich soll ueber die ganze Breite laufen – ohne das hier waere
   er nur so breit wie die Ueberschrift darueber. */
.mon-kopfzeile > div:has(.mf-monitor) { flex: 1 1 100%; }
/* In der Uebersicht steht die Kachel im Mietwagenabschnitt und braucht
   unten Luft zu den Kennzahlen darunter. */
#ueb-betrieb { margin: 0 0 16px; }
.mf-monitor {
  margin: 12px 0 0; background: var(--white, #fff);
  border: 1px solid var(--border); border-radius: var(--radius, 12px);
  padding: 16px 20px 18px;
}
.mf-mon-kopf {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.mf-mon-datum { font-size: .86rem; color: var(--muted); }
.mf-mon-link { font-size: .8rem; font-weight: 600; color: var(--gold, #1c6e8c); text-decoration: none; }
.mf-mon-link:hover { text-decoration: underline; }

/* Eine lange Zeile ueber die volle Breite statt eines Kaestchenrasters –
   vier gleich breite Spalten, erst auf schmalen Schirmen zweizeilig. */
.mf-mon-felder {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 10px; margin: 14px 0 0;
}
@media (max-width: 780px) { .mf-mon-felder { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .mf-mon-felder { grid-template-columns: 1fr; } }
.mf-mon-feld { display: flex; align-items: center; gap: 9px; min-width: 0; }
.mf-mon-feld svg { width: 20px; height: 20px; flex: none; color: var(--gold, #1c6e8c); opacity: .8; }
.mf-mon-feld b {
  font-size: 1.3rem; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.mf-mon-feld i { font-style: normal; font-size: .78rem; color: var(--muted); line-height: 1.3; min-width: 0; }

/* Der naechste Termin mit Bild – das fuellt den Bereich, ohne ihn zu
   ueberladen, und man erkennt das Fahrzeug auf einen Blick. */
.mf-mon-naechst {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 16px 0 0; padding-top: 15px; border-top: 1px solid var(--border);
}
.mf-mon-naechst.leer { color: var(--muted); font-size: .85rem; }
.mf-mon-bild {
  flex: none; width: 76px; height: 50px; border-radius: 8px; overflow: hidden;
  background: var(--off, #f0eee9); display: flex; align-items: center; justify-content: center;
  color: var(--muted);
}
.mf-mon-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mf-mon-bild svg { width: 26px; height: 26px; opacity: .45; }
.mf-mon-naechst-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mf-mon-naechst-text i {
  font-style: normal; font-size: .66rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted);
}
.mf-mon-naechst-text b { font-size: .98rem; color: var(--text); }
.mf-mon-naechst-text span { font-size: .82rem; color: var(--muted); }
/* Der Platz zwischen Fahrzeug und Stand traegt die Eckdaten: wie lange und
   was das nach Tagespreis ungefaehr ergibt. */
/* Wert und Bezeichnung nebeneinander auf einer Grundlinie – untereinander
   sassen sie je nach Laenge des Wertes auf unterschiedlicher Hoehe. */
.mf-mon-werte { display: flex; align-items: baseline; gap: 6px 18px; flex-wrap: wrap; margin-left: auto; }
.mf-mon-werte > span { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; }
.mf-mon-werte b { font-size: .95rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.mf-mon-werte i { font-style: normal; font-size: .78rem; color: var(--muted); }
.mf-mon-notiz {
  font-style: italic; color: var(--muted); font-size: .84rem;
  max-width: 30ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mf-mon-naechst .mf-bel-stand { margin-left: 0; flex: none; }

/* Kopfzeile der Zeitraumliste: Ueberschrift links, Filter rechts. */
/* Ueberschrift und Papierkorb gehoeren zusammen und stehen links; der
   Filter schiebt sich mit dem automatischen Rand nach rechts. */
.mf-bel-kopf {
  display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap;
}
.mf-bel-kopf .mf-bel-filter { margin-left: auto; }
/* Der Abstand gehoert an die Zeile, nicht an die Ueberschrift darin: mit
   dem eigenen oberen Rand der Ueberschrift sass der Papierkorb daneben
   dreizehn Pixel zu hoch. */
.mf-bel-kopf { margin: 26px 0 14px; }
.mf-bel-kopf .mf-untertitel { margin: 0; }
/* Papierkorb der Zeitraeume: nur da, wenn etwas drin ist. */
.mf-bel-korb-schalter {
  font: inherit; font-size: .8rem; color: var(--muted); cursor: pointer;
  background: var(--white, #fff); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 14px; transition: var(--transition, .2s ease);
}
.mf-bel-korb-schalter[hidden] { display: none; }
.mf-bel-korb-schalter b { color: var(--text); font-variant-numeric: tabular-nums; }
.mf-bel-korb-schalter:hover { border-color: var(--gold, #1c6e8c); color: var(--gold, #1c6e8c); }
.mf-bel-korb-schalter.offen { border-color: var(--gold, #1c6e8c); color: var(--gold, #1c6e8c); }
#mf-bel-korb { margin-bottom: 14px; }
#mf-bel-korb[hidden] { display: none; }
#mf-bel-korb .mf-korb-titel {
  font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted); margin: 0 0 10px;
}

/* Ein Bedienstreifen statt zweier Klappmenues: der Stand links, der Zeitraum
   rechts, ganz aussen die Richtung. Was gerade gilt, steht sichtbar da –
   bei einem Klappmenue muss man es erst oeffnen. */
.mf-bel-filter {
  display: inline-flex; align-items: center; gap: 2px; flex-wrap: wrap;
  background: var(--white, #fff); border: 1px solid var(--border);
  border-radius: 999px; padding: 4px;
}
.mf-bel-filter button {
  font: inherit; font-size: .8rem; color: var(--muted); cursor: pointer;
  background: none; border: 0; border-radius: 999px; padding: 6px 13px;
  transition: var(--transition, .2s ease);
}
.mf-bel-filter button:hover { color: var(--text); }
.mf-bel-filter button[aria-pressed="true"] { background: var(--carbon, #15151a); color: #fff; font-weight: 600; }
.mf-bel-filter-strich { width: 1px; align-self: stretch; margin: 4px 6px; background: var(--border); }
.mf-bel-richtung { font-size: .95rem; padding: 5px 11px; }
/* Kontaktdaten zu einer Anfrage: nur auf Klick sichtbar, denn sie sind das
   Einzige in dieser Liste mit Personenbezug. */
.mf-bel-kontakt-knopf {
  font: inherit; font-size: .8rem; cursor: pointer; color: var(--gold, #1c6e8c);
  background: rgba(28,110,140,.07); border: 1px solid rgba(28,110,140,.25);
  border-radius: 999px; padding: 6px 12px; transition: var(--transition, .2s ease);
}
.mf-bel-kontakt-knopf:hover { background: rgba(28,110,140,.14); }
.mf-bel-kontakt {
  flex-basis: 100%; margin-top: 10px; padding-top: 12px;
  border-top: 1px solid var(--border);
}
.mf-bel-kontakt[hidden] { display: none; }
.mf-bel-kontakt-daten { display: flex; gap: 6px 16px; flex-wrap: wrap; align-items: baseline; font-size: .86rem; }
.mf-bel-kontakt-daten b { color: var(--text); }
.mf-bel-kontakt-daten a { color: var(--gold, #1c6e8c); text-decoration: none; }
.mf-bel-kontakt-daten a:hover { text-decoration: underline; }
.mf-bel-kontakt-text {
  margin: 8px 0 0; font-size: .85rem; color: var(--muted); line-height: 1.6; white-space: pre-wrap;
}
.mf-bel-kontakt-weg {
  margin-top: 10px; font: inherit; font-size: .78rem; cursor: pointer;
  background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline;
}
.mf-bel-kontakt-weg:hover { color: var(--gold, #1c6e8c); }

.mf-filter-weg {
  font: inherit; font-size: .82rem; color: var(--gold, #1c6e8c); cursor: pointer;
  background: none; border: 0; padding: 0; text-decoration: underline;
}

/* ─── Bereiche der Mietwagenseite ───
   Drei Reiter statt einer Seite, die man endlos scrollt. Die Kachel darueber
   bleibt sichtbar – sie fasst alle drei zusammen. */
.mf-reiter {
  display: flex; gap: 4px; flex-wrap: wrap;
  margin: 6px 0 20px; padding: 5px;
  background: var(--white, #fff); border: 1px solid var(--border);
  border-radius: 999px; width: fit-content; max-width: 100%;
}
.mf-reiter button {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; background: none; cursor: pointer; font: inherit;
  font-size: .88rem; font-weight: 600; color: var(--muted);
  padding: 9px 20px; border-radius: 999px;
  transition: var(--transition, .2s ease);
}
.mf-reiter button:hover { color: var(--text); }
.mf-reiter button[aria-selected="true"] { background: var(--carbon, #15151a); color: #fff; }
.mf-reiter-zahl {
  font-size: .7rem; font-weight: 700; font-variant-numeric: tabular-nums;
  background: var(--off, #f0eee9); color: var(--muted);
  padding: 2px 8px; border-radius: 999px;
}
.mf-reiter-zahl[hidden] { display: none; }
/* Ungelesene Anfragen faerben die Zahl – das ist das Einzige hier, was auf
   eine Antwort wartet. */
.mf-reiter-zahl.betont { background: var(--gold, #1c6e8c); color: #fff; }
.mf-reiter button[aria-selected="true"] .mf-reiter-zahl { background: rgba(255,255,255,.16); color: #fff; }
.mf-reiter button[aria-selected="true"] .mf-reiter-zahl.betont { background: var(--gold, #1c6e8c); }

.mf-bereich[hidden] { display: none; }
/* In den Reitern braucht der erste Abschnitt oben keinen zusaetzlichen Rand. */
.mf-bereich > .mf-anfragen, .mf-bereich > .mf-bel { margin-top: 0; }
.mf-bereich .mf-fz-kopf { margin-top: 0; }
@media (max-width: 560px) {
  .mf-reiter { width: 100%; }
  .mf-reiter button { flex: 1; justify-content: center; padding: 9px 12px; }
}


/* ─── Bestand auf der Fahrzeugseite ─── */
/* Die Liste ist dieselbe wie in der Auslage auf der Website (js/vehicles.js,
   .shop-liste in style.css). Zwei Dinge passen hier nicht: die Filterleiste
   klebt dort unter der festen Kopfzeile der Website – die gibt es im
   Adminbereich nicht – und der Abstand nach oben kommt hier von der
   Abschnittsueberschrift. */
.admin-bestand { margin-top: 30px; }
/* relative, nicht static: die Blaetterei in der Mitte der Leiste ist
   absolut gesetzt und braucht die Leiste als Bezug – ohne sie landete sie
   irgendwo weiter oben auf der Seite. Sticky wie auf der Website braucht es
   hier nicht, es gibt keine feste Kopfzeile. */
.admin-bestand .veh-filters {
  position: relative; top: auto; z-index: auto;
  margin: 14px 0 16px; padding: 0; background: none;
}
.admin-bestand .shop-chips { margin-top: 14px; }
.admin-bestand .veh-more { margin-top: 24px; }
/* Die Blaetterleiste des Adminbereichs bringt einen Abstand nach oben mit –
   die kleine in der Filterzeile braucht ihn nicht. */
.admin-bestand .blatt-kurz { margin-top: 0; }
/* Auf der Website sitzt die kleine Blaetterei absolut in der Mitte der
   Leiste. Hier ist die Spalte neben der Seitenleiste schmaler – dort
   stiesse sie mit "Zuruecksetzen" zusammen. Also mitlaufend zwischen den
   beiden Gruppen, wie auf schmalen Schirmen auch. */
.admin-bestand .veh-blatt-oben { position: static; transform: none; margin: 0 auto; }
