/* Ergänzungen für den Betriebsbereich. */

.globalsuche { position: relative; flex: 1 1 320px; max-width: 460px; margin-left: 18px; }
.globalsuche input {
  width: 100%; min-height: 40px; padding: 8px 13px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .24); background: rgba(255, 255, 255, .12);
  color: #fff; font-size: .93rem;
}
.globalsuche input::placeholder { color: rgba(255, 255, 255, .68); }
.globalsuche input:focus { background: #fff; color: var(--text); outline: 3px solid rgba(255, 255, 255, .35); }
.globalsuche input:focus::placeholder { color: var(--text-gedaempft); }

.trefferliste {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--flaeche);
  border: 1px solid var(--rand); border-radius: var(--radius); box-shadow: var(--schatten-stark);
  max-height: 60vh; overflow-y: auto; z-index: 60;
}
.treffer-zeile { display: grid; grid-template-columns: 78px 1fr auto; gap: 10px; padding: 10px 13px;
  border-bottom: 1px solid var(--rand); color: var(--text); align-items: baseline; }
.treffer-zeile:last-child { border-bottom: 0; }
.treffer-zeile:hover { background: var(--flaeche-gedaempft); text-decoration: none; }
.treffer-zeile .art { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-gedaempft); font-weight: 700; }
.treffer-zeile .titel { font-weight: 620; }
.treffer-zeile .zusatz { font-size: .85rem; color: var(--text-gedaempft); }
.treffer-leer { padding: 14px; color: var(--text-gedaempft); }

.benutzeranzeige { color: rgba(255, 255, 255, .9); font-size: .9rem; padding: 0 8px; align-self: center; }

.seitenleiste a { justify-content: flex-start; }
.seitenleiste .zaehler {
  margin-left: auto; font-size: .76rem; font-weight: 700; min-width: 20px; height: 20px;
  border-radius: 999px; display: none; place-items: center; padding: 0 6px;
  background: var(--flaeche-gedaempft); color: var(--text-gedaempft);
}
.seitenleiste .zaehler:not(:empty) { display: grid; }
.seitenleiste .zaehler.fehler { background: var(--fehler); color: #fff; }
.seitenleiste .zaehler.warnung { background: var(--warnung); color: #fff; }
.seitenleiste a.aktiv .zaehler { background: rgba(255, 255, 255, .22); color: #fff; }

/* Filterleiste über Listen */
.filterleiste { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filterleiste .knopf { min-height: 38px; }
.filterleiste input, .filterleiste select { min-height: 38px; width: auto; min-width: 210px; }
.filterleiste .schalter {
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--rand-stark); background: var(--flaeche);
  font-size: .88rem; cursor: pointer; font-family: inherit; color: var(--text); min-height: 38px;
}
.filterleiste .schalter.aktiv { background: var(--primaer); color: #fff; border-color: var(--primaer); font-weight: 620; }
/* Die Anzahl im aktiven Schalter darf nicht die gedaempfte Textfarbe behalten -
   dunkles Grau auf dunklem Grund ist nicht lesbar. */
.filterleiste .schalter.aktiv .gedaempft { color: rgba(255, 255, 255, .8); }

/* Kalender der Disposition */
.kalender { display: grid; gap: 2px; grid-auto-rows: minmax(58px, auto); }
.kalender-kopf { display: grid; gap: 2px; font-size: .78rem; color: var(--text-gedaempft); font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.kalender-zelle { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius-klein); padding: 6px; min-width: 0; }
.kalender-zelle.heute { border-color: var(--primaer); box-shadow: inset 0 0 0 1px var(--primaer); }
.kalender-zelle .tagzahl { font-size: .78rem; color: var(--text-gedaempft); font-weight: 700; margin-bottom: 4px; }
.kalender-zelle.wochenende { background: var(--flaeche-gedaempft); }
.termin {
  display: block; width: 100%; text-align: left; border: 0; border-radius: 4px; padding: 4px 6px;
  font-size: .78rem; margin-bottom: 3px; cursor: pointer; font-family: inherit; line-height: 1.25;
  background: var(--info-grund); color: #123a68; border-left: 3px solid var(--info);
}
.termin.rueckholung { background: var(--warnung-grund); color: #6d4506; border-left-color: var(--warnung); }
.termin.erledigt { background: var(--gut-grund); color: #12512f; border-left-color: var(--gut); }
.termin.offen { background: var(--fehler-grund); color: #7d1818; border-left-color: var(--fehler); }
.termin strong { display: block; font-weight: 700; }

/* Belegungsband je Gerät */
.belegungsband { display: grid; grid-template-columns: 132px 1fr; gap: 8px; align-items: center; margin-bottom: 6px; }
.band { position: relative; height: 26px; background: var(--flaeche-gedaempft); border-radius: 4px; overflow: hidden; }
.band .stueck { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.band .stueck.miete { background: var(--primaer); }
.band .stueck.puffer { background: repeating-linear-gradient(45deg, #b9c6d3, #b9c6d3 4px, #cdd7e1 4px, #cdd7e1 8px); }
.band .stueck.transport { background: var(--akzent); }
.band .stueck.reinigung { background: #9db3c6; }
.band .stueck.wartung, .band .stueck.sperre { background: var(--fehler); }
.bandlegende { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--text-gedaempft); margin-top: 8px; }
.bandlegende span { display: inline-flex; align-items: center; gap: 6px; }
.bandlegende i { width: 14px; height: 12px; border-radius: 3px; display: inline-block; }

/* Karte der Standorte */
.standortkarte { position: relative; width: 100%; height: 420px; background: var(--flaeche-gedaempft);
  border: 1px solid var(--rand); border-radius: var(--radius); overflow: hidden; }
.standortkarte .punktmarke {
  position: absolute; transform: translate(-50%, -100%); background: var(--primaer); color: #fff;
  padding: 4px 8px; border-radius: 6px; font-size: .78rem; font-weight: 650; white-space: nowrap;
  cursor: pointer; box-shadow: var(--schatten);
}
.standortkarte .punktmarke::after {
  content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--primaer);
}
.standortkarte .punktmarke.wartung { background: var(--fehler); }
.standortkarte .punktmarke.wartung::after { border-top-color: var(--fehler); }
.standortkarte .hinweis-mitte { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-gedaempft); }

/* Detailspalten */
.detailraster { display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--abstand); align-items: start; }
@media (max-width: 1000px) { .detailraster { grid-template-columns: 1fr; } }

.merkzeile { display: grid; grid-template-columns: 190px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--rand); }
.merkzeile:last-child { border-bottom: 0; }
.merkzeile .name { color: var(--text-gedaempft); font-size: .9rem; }
.merkzeile .wert { font-weight: 560; min-width: 0; overflow-wrap: break-word; }

/* Im Detailraster stehen Karten nebeneinander - dort ist neben der
   Namensspalte kaum Platz. Dann untereinander statt Wörter zerhacken. */
.karte { container-type: inline-size; }
@container (max-width: 460px) {
  .merkzeile { grid-template-columns: 1fr; gap: 2px; }
  .merkzeile .name { font-size: .82rem; }
}

.verlauf { position: relative; padding-left: 20px; }
.verlauf::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--rand); }
.verlauf .eintrag { position: relative; padding: 0 0 14px 0; }
.verlauf .eintrag::before {
  content: ""; position: absolute; left: -19px; top: 5px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--flaeche); border: 2px solid var(--primaer);
}
.verlauf .zeitpunkt { font-size: .8rem; color: var(--text-gedaempft); }

/* Kopfzeile auf schmalen Geräten -------------------------------------------
   Suchfeld, Benutzername und Abmelden passen neben der Marke nicht in eine
   Zeile: das Suchfeld schrumpfte auf Symbolbreite und der Rollenname lief
   seitlich aus dem Bild. Die Suche bekommt deshalb eine eigene Zeile. */
@media (max-width: 720px) {
  .globalsuche { flex: 1 1 100%; order: 4; margin-left: 0; max-width: none; }
  .benutzeranzeige { padding: 8px 13px; overflow-wrap: anywhere; }
}

/* Einsätze ------------------------------------------------------------------
   Die Aktionsspalte trägt drei Knöpfe nebeneinander. Ohne feste Anordnung
   stapeln sie sich ungleich - der randlose "schlicht"-Knopf sieht dann wie
   ein verrutschter Link aus. Die Auftragsnummer darf nicht umbrechen:
   "A2026-" über "0001" liest sich wie zwei verschiedene Nummern. */
.einsatzknoepfe {
  display: flex; gap: 6px; justify-content: flex-end; align-items: center; flex-wrap: wrap;
}
.einsatzknoepfe .knopf { white-space: nowrap; }
/* Die Aktionsspalte fordert nebeneinander rund 345px - ein Drittel der ganzen
   Liste. Auf Laptopbreiten (901-1399px) sprengte diese Mindestbreite den
   Rahmen: gemessen 231px Überhang bei 1100px, der Knopf "Aufgestellt" lag
   ausserhalb. Der Rahmen rollt zwar, aber niemand rollt eine Liste zur Seite,
   um den wichtigsten Knopf zu finden. Deshalb gilt die Mindestbreite erst,
   wo sie nachweislich hineinpasst; darunter brechen die Knöpfe rechtsbündig
   um. Die Zeilenhöhe trägt das, weil jede Zelle ohnehin zweizeilig ist. */
@media (min-width: 1400px) {
  table.liste td:has(> .einsatzknoepfe) { min-width: 345px; }
}
/* Dazwischen reicht die Breite für einen Knopf je Zeile. Statt sie im
   Zufallsumbruch verschieden breit rechts hängen zu lassen, stehen sie
   bewusst als Gruppe untereinander - gleiche Breite, gleiche Kanten. Die
   Zeile ist ohnehin vierzeilig, die Höhe kostet also nichts. */
/* Seit "Erfassen" dazugekommen ist, sind es vier Knöpfe: untereinander
   ergäbe das rund 200 px Zeilenhöhe, und eine Liste aus zwölf Einsätzen
   passt dann nicht mehr auf einen Bildschirm. Deshalb zwei nebeneinander. */
@media (min-width: 1001px) and (max-width: 1399px) {
  table.liste td:has(> .einsatzknoepfe) { min-width: 232px; }
  .einsatzknoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-items: stretch; }
  .einsatzknoepfe .knopf { width: 100%; }
}
table.liste td .nummer { white-space: nowrap; }

@media (max-width: 1000px) {
  .einsatzknoepfe { justify-content: flex-start; }
}

/* --- Posteingang ---------------------------------------------------------
   Der Nachrichtentext kommt als Klartext aus dem Postfach: Zeilenumbrüche
   gehören erhalten, überlange Zeilen (Signaturen, Links) dürfen die Karte
   aber nicht seitlich aufreißen. */
.mailtext {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: inherit;
  font-size: .95rem;
  line-height: 1.55;
  color: var(--text);
  max-height: 34em;
  overflow-y: auto;
}
.anhangliste { margin: 6px 0 0; padding-left: 18px; }
.anhangliste li { margin-bottom: 4px; }
.anhangliste .gedaempft { margin-left: 6px; }

/* --- Plattform: White-Label-Betriebe -------------------------------------
   Eine fehlende Klasse fällt lautlos auf den Browser-Standard zurück und
   sieht dann nur „etwas anders" aus statt kaputt. Deshalb steht hier jede
   Klasse, die ansicht-plattform.js benutzt. */

/* Modulauswahl im Anlege- und Vertragsdialog. Zwei Spalten, damit zwölf
   Module nicht zu einer Bildschirmlänge werden. */
.modulliste {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 4px 18px;
  margin: 8px 0 4px;
}
.modulliste .wahl { margin: 0; }
/* Der Grundumfang ist angehakt und gesperrt - das muss man sehen, sonst
   klickt jemand vergeblich dagegen. */
.modulliste .wahl input:disabled + span .titel { color: var(--text-gedaempft); }
.modulliste .wahl input:disabled { cursor: not-allowed; }

/* Adressen in der Betriebsliste: Host, Hauptadresse, Zertifikatsstand. */
.adresszeile { margin-bottom: 6px; line-height: 1.5; }
.adresszeile:last-child { margin-bottom: 0; }
.adresszeile a { text-decoration: none; }
.adresszeile a:hover code { text-decoration: underline; }
.adresszeile .schild { margin-left: 4px; }

/* Farbvorschau in der Akte. */
.farbklecks {
  display: inline-block; width: 22px; height: 22px; margin-right: 4px;
  border: 1px solid var(--rand); border-radius: 5px; vertical-align: middle;
}

/* Aufzählung im Ergebnisdialog nach dem Anlegen. */
.erwartungsliste { margin: 8px 0 0; padding-left: 20px; }
.erwartungsliste li { margin-bottom: 6px; line-height: 1.55; }

/* Ein Hilfetext, der gerade etwas beanstandet - etwa ein vergebener
   Kurzname. Er muss sich vom ruhigen Hilfetext abheben, sonst liest ihn
   niemand. Kontrast auf hellem Grund: 5,4:1. */
.hilfe.warnt { color: var(--warnung); font-weight: 600; }

/* Logo in den Einstellungen: Die Vorschau muss auf BEIDEN Untergründen
   gezeigt werden. Ein weißes Logo auf weißem Grund sieht aus wie „kein
   Logo hinterlegt" - genau dieser Irrtum kostet sonst eine Rückfrage. */
.logofeld {
  display: flex; align-items: center; justify-content: center;
  min-height: 84px; margin-bottom: 8px; padding: 10px;
  background: #ffffff; border: 1px solid var(--rand); border-radius: var(--radius);
}
.logofeld.dunkel { background: var(--primaer-dunkel, #0d1f33); }
.logofeld.dunkel .gedaempft { color: #b9c6d4; }
.logovorschau { max-height: 64px; max-width: 100%; object-fit: contain; }

/* Sammelexport: Auf dem Handy eine kompakte Zeile je Bereich statt einer
   Karte mit Beschriftungen - vorher war jede Karte 218 px hoch und „Alles als
   ein ZIP“ lag fast fünf Bildschirmhöhen tief. */
@media (max-width: 700px) {
  table.export-liste tr {
    display: grid; grid-template-columns: 28px 1fr auto;
    grid-template-areas: "wahl name knopf" "wahl zeit knopf";
    gap: 2px 10px; align-items: center; padding: 8px 12px;
  }
  table.export-liste td, table.export-liste tr:last-child td { padding: 0; min-height: 0; border: 0; }
  table.export-liste td[data-spalte]::before { display: none; }
  table.export-liste td:nth-child(1) { grid-area: wahl; }
  table.export-liste td:nth-child(2) { grid-area: name; }
  table.export-liste td:nth-child(3) { grid-area: zeit; font-size: .85rem; }
  table.export-liste td:nth-child(4) { grid-area: knopf; }
  .export-aktionen {
    position: sticky; bottom: 0; z-index: 5; flex-wrap: wrap;
    background: var(--grund); padding: 10px 0;
  }
}
/* Ein arbeitender Knopf bleibt lesbar - mit halber Deckkraft stand
   „Wird gepackt …“ bei 1,9:1 Kontrast. */
.knopf[aria-busy="true"]:disabled { opacity: 1; cursor: progress; }

/* Preisaufstellung in der Strecke "Buchung aufnehmen / Angebot erstellen".
   Die Regel stand bis 13.10.2026 nur im Shop-Stil (start.css), den das Büro
   nicht lädt - Name und Betrag liefen ohne Abstand ineinander
   ("Netto1.998,16 €"). */
.dialog .datenliste { display: grid; gap: 6px; font-size: .92rem; margin: 10px 0 0; }
.dialog .datenliste > div {
  display: flex; justify-content: space-between; gap: 12px;
  border-bottom: 1px dotted var(--rand); padding-bottom: 5px;
}
.dialog .datenliste .name { color: var(--text-gedaempft); }
.dialog .datenliste .wert { font-weight: 600; text-align: right; white-space: nowrap; color: var(--text); }
/* Bestand an der Baustelle (Kundenakte): kompakt unter der Anschrift. */
.bestand { margin: .6rem 0 0; padding: .5rem .7rem; background: var(--flaeche-hell, #f3f6fa);
  border-radius: 8px; }
.bestand-titel { font-size: .78rem; font-weight: 600; letter-spacing: .02em; color: var(--text-gedaempft);
  text-transform: uppercase; }
.bestandsliste { margin: .25rem 0 0 1.1rem; padding: 0; font-weight: 400; font-size: .9rem; color: var(--text); }
.bestandsliste li { margin: 2px 0; }
.bestandsliste a { color: var(--text-gedaempft); }
