/* ==========================================================================
   Schleppify – Gestaltung
   Mobile first: Grundregeln gelten fürs Handy, ab 900px kommt die Seitenleiste.
   Die Akzentfarbe (--akzent) wird pro Betrieb in den Einstellungen gewählt.
   ========================================================================== */

:root {
    --akzent: #f2994a;
    --akzent-text: #14171f;
    --dunkel: #14171f;
    --dunkel-2: #1d212c;
    --dunkel-3: #2a2f3c;
    --hell: #f4f5f7;
    --weiss: #ffffff;
    --text: #1b1f2a;
    --text-2: #5b6272;
    --rand: #e3e6ec;
    --gruen: #1f9d55;
    --gruen-hell: #e6f6ec;
    --rot: #d64545;
    --rot-hell: #fdecec;
    --gelb-hell: #fff6e5;
    --radius: 14px;
    --radius-klein: 10px;
    --schatten: 0 1px 2px rgba(20, 23, 31, .06), 0 4px 16px rgba(20, 23, 31, .05);
    --leiste-hoehe: 64px;
    --schrift: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--schrift);
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
    background: var(--hell);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 750; }
h2 { font-size: 1.1rem; font-weight: 700; margin-top: .25rem; }
p { margin: 0 0 1rem; }
a { color: inherit; }
code { background: var(--hell); padding: .1em .35em; border-radius: 6px; font-size: .9em; }
img { max-width: 100%; }

.icon { width: 22px; height: 22px; flex-shrink: 0; }
.gedaempft { color: var(--text-2); }
.klein { font-size: .875rem; }
.vorformatiert { white-space: pre-wrap; }

/* ---------- Marke ---------- */
.marke { display: flex; align-items: center; gap: .65rem; text-decoration: none; font-weight: 750; }
.marke-zeichen {
    display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
    background: var(--akzent); color: var(--akzent-text);
}
.marke-logo { width: 38px; height: 38px; object-fit: contain; border-radius: 8px; background: #fff; padding: 3px; }
.marke-name { font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.marke-gross { justify-content: center; margin-bottom: 1.5rem; }
.marke-gross .marke-zeichen { width: 46px; height: 46px; border-radius: 13px; }
.marke-gross .marke-name { font-size: 1.5rem; }

/* ---------- Rahmen & Navigation ---------- */
.rahmen { min-height: 100vh; }

.inhalt {
    max-width: 980px;
    margin: 0 auto;
    padding: 1.25rem 1rem calc(var(--leiste-hoehe) + 2rem + env(safe-area-inset-bottom));
}

.seitenleiste {
    position: fixed; inset: 0 auto 0 0; z-index: 40;
    width: 270px; max-width: 85vw;
    display: flex; flex-direction: column; gap: 1.25rem;
    padding: 1.25rem .85rem calc(1rem + env(safe-area-inset-bottom));
    background: var(--dunkel); color: #e9ebf0;
    transform: translateX(-100%);
    transition: transform .22s ease;
    overflow-y: auto;
}
.menue-offen .seitenleiste { transform: none; }
.seitenleiste .marke { padding: 0 .5rem; color: #fff; }

.abdunkeln {
    position: fixed; inset: 0; z-index: 30; background: rgba(10, 12, 18, .45);
    opacity: 0; pointer-events: none; transition: opacity .2s;
}
.menue-offen .abdunkeln { opacity: 1; pointer-events: auto; }

.hauptnavigation { display: flex; flex-direction: column; gap: 2px; }

.nav-eintrag {
    display: flex; align-items: center; gap: .75rem; width: 100%;
    padding: .7rem .75rem; border: 0; border-radius: var(--radius-klein);
    background: none; color: #c5cad6; font: inherit; font-weight: 550; text-align: left;
    text-decoration: none; cursor: pointer;
}
.nav-eintrag:hover { background: var(--dunkel-2); color: #fff; }
.nav-eintrag.aktiv { background: var(--dunkel-3); color: #fff; }
.nav-eintrag.aktiv .icon { color: var(--akzent); }
.nav-eintrag.bald { opacity: .45; cursor: default; }
.nav-eintrag.bald:hover { background: none; color: #c5cad6; }
.nav-eintrag small {
    margin-left: auto; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em;
    border: 1px solid #4a5060; border-radius: 99px; padding: 0 .45rem;
}

.seitenleiste-fuss { margin-top: auto; border-top: 1px solid var(--dunkel-3); padding-top: .75rem; }
.seitenleiste-fuss form { margin: 0; }
.version { color: #6d7486; font-size: .75rem; margin: .5rem .75rem 0; }

/* Leiste unten (Handy) */
.mobilleiste {
    position: fixed; inset: auto 0 0 0; z-index: 20;
    display: flex; justify-content: space-around;
    height: calc(var(--leiste-hoehe) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px);
    border-top: 1px solid var(--rand);
}
.mobil-eintrag {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    border: 0; background: none; font: inherit; font-size: .7rem; font-weight: 600;
    color: var(--text-2); text-decoration: none; cursor: pointer;
}
.mobil-eintrag.aktiv { color: var(--text); }
.mobil-eintrag.aktiv .icon { color: var(--akzent); }
.mobil-eintrag.bald { opacity: .35; }

@media (min-width: 900px) {
    .seitenleiste { transform: none; }
    .abdunkeln, .mobilleiste { display: none; }
    .rahmen { padding-left: 270px; }
    .inhalt { padding: 2rem 2rem 3rem; }
}

/* ---------- Kopfbereich einer Seite ---------- */
.kopf { margin-bottom: 1.25rem; }
.kopf-zeile { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.kopf-zeile h1 { margin: 0; }
.zurueck {
    display: inline-flex; align-items: center; gap: .2rem; margin-bottom: .5rem;
    color: var(--text-2); text-decoration: none; font-weight: 600; font-size: .9rem;
}
.zurueck .icon { width: 18px; height: 18px; }

/* ---------- Karten ---------- */
.karte {
    background: var(--weiss); border: 1px solid var(--rand); border-radius: var(--radius);
    box-shadow: var(--schatten); padding: 1.25rem; margin-bottom: 1rem;
}
.karte > :last-child { margin-bottom: 0; }

.raster-karten { display: grid; gap: .75rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .raster-karten { grid-template-columns: 1fr 1fr; } }

.karte-link {
    display: flex; gap: 1rem; align-items: center; margin: 0; text-decoration: none;
    transition: border-color .15s, transform .15s;
}
a.karte-link:hover { border-color: var(--akzent); transform: translateY(-1px); }
.karte-link small { display: block; color: var(--text-2); }
.karte-link.bald { opacity: .55; }
.karte-icon {
    display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
    background: var(--hell); color: var(--text);
}

/* ---------- Kacheln (Startseite) ---------- */
.kacheln { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: .5rem; }
@media (min-width: 760px) { .kacheln { grid-template-columns: repeat(4, 1fr); } }
.kachel {
    display: flex; flex-direction: column; gap: .2rem;
    background: var(--weiss); border: 1px solid var(--rand); border-radius: var(--radius);
    box-shadow: var(--schatten); padding: 1rem;
}
.kachel-icon { color: var(--akzent); }
.kachel-zahl { font-size: 1.75rem; font-weight: 800; line-height: 1.1; }
.kachel-text { color: var(--text-2); font-size: .875rem; font-weight: 550; }
.kachel.bald .kachel-zahl { color: #b8bdc8; }

/* ---------- Checkliste / Fortschritt ---------- */
.fortschritt { height: 8px; background: var(--hell); border-radius: 99px; overflow: hidden; margin-bottom: 1rem; }
.fortschritt span { display: block; height: 100%; background: var(--akzent); border-radius: 99px; }
.checkliste { list-style: none; margin: 0; padding: 0; }
.checkliste li { display: flex; align-items: center; gap: .65rem; padding: .55rem 0; border-top: 1px solid var(--rand); }
.checkliste li:first-child { border-top: 0; }
.checkliste a { display: inline-flex; align-items: center; gap: .25rem; font-weight: 600; text-decoration: none; }
.checkliste a .icon { width: 16px; height: 16px; }
.check-symbol { color: #b8bdc8; display: grid; }
.checkliste li.ok { color: var(--text-2); }
.checkliste li.ok .check-symbol { color: var(--gruen); }

/* ---------- Listen ---------- */
.liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.liste-eintrag {
    display: flex; align-items: center; gap: .85rem; padding: .85rem 1rem;
    background: var(--weiss); border: 1px solid var(--rand); border-radius: var(--radius);
    text-decoration: none; transition: border-color .15s;
}
.liste-eintrag:hover { border-color: var(--akzent); }
.liste-eintrag.inaktiv { opacity: .55; }
.liste-icon { color: var(--text-2); display: grid; }
.liste-text { flex: 1; min-width: 0; }
.liste-text strong { display: block; }
.liste-text small { display: block; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.liste-rechts { display: flex; align-items: center; gap: .5rem; color: var(--text-2); }

.avatar {
    display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%;
    background: var(--akzent); color: var(--akzent-text); font-weight: 750;
}
.avatar.klein { width: 26px; height: 26px; font-size: .8rem; }

.marke-klein { font-size: .75rem; font-weight: 650; padding: .1rem .5rem; border-radius: 99px; }
.marke-klein.grau { background: var(--hell); color: var(--text-2); }

/* ---------- Formulare ---------- */
.formular { display: flex; flex-direction: column; gap: .9rem; }
.formular h2 { margin-top: .5rem; }
.formular label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .9rem; }
.formular .karte { display: flex; flex-direction: column; gap: .9rem; margin: 0; }

input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]), textarea, select {
    width: 100%; min-height: 48px; padding: .7rem .85rem;
    font: inherit; font-weight: 400; color: var(--text);
    background: var(--weiss); border: 1.5px solid var(--rand); border-radius: var(--radius-klein);
    transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus, select:focus {
    outline: none; border-color: var(--akzent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--akzent) 25%, transparent);
}
input[type="file"] { font: inherit; font-weight: 400; }
input[type="color"] { width: 64px; height: 44px; padding: 2px; border: 1.5px solid var(--rand); border-radius: var(--radius-klein); background: #fff; }

.feldgruppe { display: grid; gap: .9rem; grid-template-columns: 1fr; }
@media (min-width: 640px) {
    .feldgruppe.zwei { grid-template-columns: 1fr 1fr; }
    .feldgruppe.zwei-eins { grid-template-columns: 2fr 1fr; }
    .feldgruppe.eins-zwei { grid-template-columns: 1fr 2fr; }
}

.formular label.schalter, .formular label.auswahl-karte, .formular label.farbwahl {
    flex-direction: row; align-items: center; gap: .65rem; font-weight: 550;
}
.schalter input, .auswahl-karte input { width: 22px; height: 22px; accent-color: var(--akzent); flex-shrink: 0; }
.schalter > span > small { display: block; margin-top: .1rem; }

.auswahl-karten { display: grid; gap: .5rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .auswahl-karten { grid-template-columns: 1fr 1fr; } }
.auswahl-karte {
    padding: .75rem .9rem; border: 1.5px solid var(--rand); border-radius: var(--radius-klein);
    cursor: pointer; background: var(--weiss);
}
.auswahl-karte:has(input:checked) {
    border-color: var(--akzent); background: color-mix(in srgb, var(--akzent) 8%, white);
}

.logo-zeile { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.logo-vorschau {
    width: 120px; height: 80px; object-fit: contain; border: 1px solid var(--rand);
    border-radius: var(--radius-klein); background: #fff; padding: 6px;
}
.logo-vorschau.leer { display: grid; place-items: center; color: var(--text-2); font-size: .85rem; }

.aktionen { display: flex; gap: .75rem; justify-content: flex-end; flex-wrap: wrap; }
.aktionen-fest {
    position: sticky; bottom: calc(var(--leiste-hoehe) + env(safe-area-inset-bottom) + .5rem);
    padding: .75rem; background: rgba(244, 245, 247, .9); backdrop-filter: blur(8px); border-radius: var(--radius);
}
@media (min-width: 900px) { .aktionen-fest { bottom: 1rem; } }
.nebenaktion { margin-top: .5rem; display: flex; justify-content: flex-end; }

/* ---------- Knöpfe ---------- */
.knopf {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    min-height: 48px; padding: .7rem 1.2rem; border: 0; border-radius: var(--radius-klein);
    background: var(--dunkel); color: #fff; font: inherit; font-weight: 650;
    text-decoration: none; cursor: pointer; transition: filter .15s, transform .05s;
}
.knopf:hover { filter: brightness(1.15); }
.knopf:active { transform: scale(.98); }
.knopf .icon { width: 20px; height: 20px; }
.knopf-voll { width: 100%; background: var(--akzent); color: var(--akzent-text); }
.knopf-leise { background: transparent; color: var(--text-2); border: 1.5px solid var(--rand); }
.knopf-leise:hover { color: var(--text); filter: none; border-color: #c9ced8; }

/* ---------- Hinweise ---------- */
.hinweis {
    padding: .8rem 1rem; border-radius: var(--radius-klein); margin-bottom: 1rem;
    font-weight: 550; border: 1px solid transparent; transition: opacity .4s;
}
.hinweis-erfolg { background: var(--gruen-hell); color: #13683a; border-color: #bfe6cf; }
.hinweis-fehler { background: var(--rot-hell); color: #9b2c2c; border-color: #f5c6c6; }
.hinweis-info { background: var(--gelb-hell); color: #7a4a00; border-color: #f6dfb0; }

/* ---------- Schlichtes Layout (Anmeldung, Installation) ---------- */
body.schlicht {
    min-height: 100vh;
    background: radial-gradient(1200px 600px at 50% -200px, color-mix(in srgb, var(--akzent) 22%, var(--hell)), var(--hell));
}
.schlicht-inhalt { max-width: 560px; margin: 0 auto; padding: 2.5rem 1rem 2rem; }
.schlicht .karte { padding: 1.5rem; }
.karte-schmal { max-width: 420px; margin-left: auto; margin-right: auto; }
.login-logo { display: block; max-height: 72px; margin: 0 auto 1rem; }
.fusszeile-klein { text-align: center; color: var(--text-2); font-size: .8rem; margin-top: 1.5rem; }

.schritte { display: flex; gap: .5rem; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.schritte li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .3rem; color: var(--text-2); font-size: .8rem; text-align: center; }
.schritt-nr {
    display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
    background: var(--hell); font-weight: 700; color: var(--text-2);
}
.schritt-nr .icon { width: 18px; height: 18px; }
.schritte li.aktuell { color: var(--text); font-weight: 650; }
.schritte li.aktuell .schritt-nr { background: var(--akzent); color: var(--akzent-text); }
.schritte li.erledigt .schritt-nr { background: var(--gruen); color: #fff; }

.pruefliste { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.pruefliste li { display: flex; gap: .75rem; align-items: flex-start; padding: .6rem 0; border-top: 1px solid var(--rand); }
.pruefliste li:first-child { border-top: 0; }
.pruef-symbol {
    display: grid; place-items: center; width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%;
    font-weight: 800; font-size: .85rem;
}
.pruef-symbol .icon { width: 16px; height: 16px; }
.pruefliste li.ok .pruef-symbol { background: var(--gruen-hell); color: var(--gruen); }
.pruefliste li.fehlt .pruef-symbol { background: var(--rot-hell); color: var(--rot); }
.pruefliste li.warnung .pruef-symbol { background: var(--gelb-hell); color: #b26b00; }
.pruefliste small { color: var(--text-2); }

/* ---------- Kunden & Objekte ---------- */
.filterleiste {
    display: grid; gap: .6rem; grid-template-columns: 1fr; margin-bottom: 1rem;
    background: var(--weiss); border: 1px solid var(--rand); border-radius: var(--radius); padding: .75rem;
}
.filterleiste .schalter { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--text-2); }
.filterleiste .schalter input { width: 20px; height: 20px; accent-color: var(--akzent); }
@media (min-width: 760px) { .filterleiste { grid-template-columns: 1fr 220px auto auto; align-items: center; } }

.leer-hinweis { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .5rem; padding: 2rem 1.25rem; }
.leer-hinweis p { max-width: 460px; }

.avatar.quadrat { border-radius: 12px; background: var(--hell); color: var(--text); }
.kundennummer { font-size: .8rem; font-variant-numeric: tabular-nums; color: var(--text-2); display: none; }
@media (min-width: 640px) { .kundennummer { display: inline; } }
.marke-klein.gruen { background: var(--gruen-hell); color: #13683a; }

.zwei-spalten { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.zwei-spalten > .karte { margin: 0; }
@media (min-width: 760px) { .zwei-spalten { grid-template-columns: 1fr 1fr; } }

.daten { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1rem; margin: 0 0 1rem; }
.daten dt { color: var(--text-2); font-size: .9rem; }
.daten dd { margin: 0; overflow-wrap: anywhere; }

.schnellaktionen { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.abschnitt { margin-top: 1.75rem; margin-bottom: .35rem; }
.abschnitt h2 { margin: 0; }
.textlink { color: var(--text); font-weight: 600; font-size: .9rem; }

/* ---------- Aufträge ---------- */
.knopf-akzent { background: var(--akzent); color: var(--akzent-text); }
.knopf-gefahr { background: var(--rot); color: #fff; }
.knopf-gross { width: 100%; min-height: 64px; font-size: 1.15rem; border-radius: var(--radius); }
.knopf-gross .icon { width: 26px; height: 26px; }
.knopf.laedt { opacity: .7; }
.knopf.laedt::after { content: " …"; }

.reiter { display: flex; gap: .25rem; margin-bottom: .75rem; overflow-x: auto; }
.reiter a {
    padding: .55rem .9rem; border-radius: 99px; text-decoration: none; font-weight: 650; font-size: .9rem;
    color: var(--text-2); white-space: nowrap;
}
.reiter a.aktiv { background: var(--dunkel); color: #fff; }
.suchzeile { margin-bottom: 1rem; }

.status {
    display: inline-flex; align-items: center; padding: .2rem .65rem; border-radius: 99px;
    font-size: .78rem; font-weight: 700; white-space: nowrap; background: var(--hell); color: var(--text-2);
}
.status-neu { background: #fde8e8; color: #b42318; }
.status-zugewiesen { background: #eef2ff; color: #3538cd; }
.status-unterwegs { background: #fff4e5; color: #b54708; }
.status-vorort { background: #fef7c3; color: #854a0e; }
.status-hof { background: #ecfdf3; color: #067647; }
.status-erledigt { background: #f2f4f7; color: #344054; }
.status-storniert { background: #f2f4f7; color: #98a2b3; text-decoration: line-through; }

.einsatzart { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 700; color: var(--text-2); }
.einsatzart::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--einsatzfarbe, #999); }
.einsatzart-zeile { display: flex; gap: .5rem; align-items: center; margin-bottom: .35rem; }
.marke-klein.rot { background: var(--rot-hell); color: var(--rot); }
.pflicht-stern { color: var(--rot); }
.warnung-text { color: var(--rot); font-weight: 650; }

.kennzeichen {
    display: inline-block; padding: .1rem .5rem; border: 2px solid var(--text); border-radius: 6px;
    background: #fff; font-family: "DIN Alternate", "Arial Narrow", var(--schrift); font-weight: 800;
    letter-spacing: .04em; font-size: .95rem; white-space: nowrap;
    border-left: 10px solid #1a47b8;
}
.kennzeichen.gross { font-size: 1.5rem; padding: .15rem .7rem; }
.eingabe-kennzeichen { text-transform: uppercase; font-weight: 700; letter-spacing: .04em; }

.auftragsliste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.auftrag-karte {
    display: flex; flex-direction: column; gap: .45rem; padding: .9rem 1rem;
    background: var(--weiss); border: 1px solid var(--rand); border-left: 5px solid var(--einsatzfarbe, var(--rand));
    border-radius: var(--radius); text-decoration: none; box-shadow: var(--schatten); transition: transform .12s;
}
.auftrag-karte:hover { transform: translateY(-1px); }
.auftrag-karte.dringend { box-shadow: 0 0 0 2px var(--rot-hell), var(--schatten); }
.auftrag-oben { display: flex; align-items: center; gap: .5rem; }
.auftrag-oben .status { margin-left: auto; }
.auftrag-mitte { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; }
.auftrag-mitte strong { font-size: 1.02rem; }
.auftrag-mitte small { color: var(--text-2); width: 100%; }
.auftrag-unten { display: flex; flex-wrap: wrap; gap: .2rem 1rem; color: var(--text-2); font-size: .82rem; }
.auftrag-unten span { display: inline-flex; align-items: center; gap: .25rem; }
.auftrag-unten .icon { width: 16px; height: 16px; }

.aktionsbereich {
    display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; padding: 1rem;
    background: var(--weiss); border: 1px solid var(--rand); border-radius: var(--radius); box-shadow: var(--schatten);
}
.aktionsbereich form { margin: 0; }
.aktionsbereich .hinweis { margin: 0; }
.aktionsbereich-titel { margin: .25rem 0 0; font-weight: 700; }
.abschluss-knoepfe { display: grid; gap: .5rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .abschluss-knoepfe { grid-template-columns: 1fr 1fr; } }
.knopf-abschluss { width: 100%; min-height: 56px; background: var(--hell); color: var(--text); border: 1.5px solid var(--rand); text-align: left; justify-content: flex-start; }
.knopf-abschluss.abschluss-abgeschleppt { background: var(--gruen); color: #fff; border-color: var(--gruen); }

.adresse-gross { font-size: 1.15rem; font-weight: 700; margin-bottom: .75rem; }
.feldgruppe.drei { grid-template-columns: 1fr; }
@media (min-width: 640px) { .feldgruppe.drei { grid-template-columns: 1fr 1fr 1fr; } }
.schalter-unten { align-self: end; min-height: 48px; }
.auswahl-karte .punkt { width: 10px; height: 10px; border-radius: 50%; background: var(--einsatzfarbe, #999); flex-shrink: 0; }

.aufklapper { margin-top: .75rem; }
.aufklapper summary { cursor: pointer; font-weight: 650; padding: .5rem 0; }
.aufklapper[open] summary { margin-bottom: .5rem; }
.aufklapper.gefahr { margin: 1.5rem 0 0; color: var(--rot); }
.aufklapper.gefahr .formular { color: var(--text); }

.zeilenformular { display: flex; gap: .5rem; flex-wrap: wrap; }
.zeilenformular select { flex: 1; min-width: 200px; }

.verlauf { list-style: none; margin: 0; padding: 0; }
.verlauf li { display: grid; grid-template-columns: 110px 1fr; gap: .75rem; padding: .55rem 0; border-top: 1px solid var(--rand); }
.verlauf li:first-child { border-top: 0; }
.verlauf-zeit { color: var(--text-2); font-size: .85rem; font-variant-numeric: tabular-nums; }
.verlauf-text small { display: block; color: var(--text-2); }
a.kachel { text-decoration: none; transition: border-color .15s; }
a.kachel:hover { border-color: var(--akzent); }
.kachel-alarm { border-color: #f5c6c6; background: var(--rot-hell); }
.kachel-alarm .kachel-icon { color: var(--rot); }
.start-knopf { margin-bottom: 1rem; }
@media (min-width: 900px) { .start-knopf { width: auto; min-height: 52px; font-size: 1rem; } }

/* --------------------------------------------------------------------------
   Fotos und Unterschrift
   -------------------------------------------------------------------------- */
.versteckt { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .9rem; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; }
.chip span {
    display: inline-block; padding: .45rem .85rem; border: 1px solid var(--rand); border-radius: 999px;
    background: var(--weiss); font-size: .9rem; color: var(--text-2);
}
a.chip { text-decoration: none; color: inherit; }
.chip.aktiv span, .chip input:checked + span { background: var(--dunkel); border-color: var(--dunkel); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--akzent); outline-offset: 2px; }

.foto-knoepfe { display: grid; gap: .6rem; }
.foto-knoepfe .knopf { position: relative; cursor: pointer; }
@media (min-width: 600px) { .foto-knoepfe { grid-template-columns: 2fr 1fr; } }
.foto-upload.laedt .foto-knoepfe { opacity: .55; pointer-events: none; }
.foto-fortschritt { margin-top: .7rem; padding: .6rem .8rem; border-radius: var(--radius-klein); background: var(--hell); font-size: .92rem; }
.foto-fortschritt.fehler { background: var(--rot-hell); color: var(--rot); }

.foto-gruppe { font-size: .95rem; margin: 1.2rem 0 .5rem; color: var(--text-2); }
.foto-raster { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .5rem; }
.foto-raster li { position: relative; }
.foto-raster img {
    display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-klein);
    background: var(--hell); border: 1px solid var(--rand);
}
.foto-raster small { display: block; font-size: .75rem; color: var(--text-2); margin-top: .15rem; }
.foto-raster form { position: absolute; top: 4px; right: 4px; }

.mini-knopf {
    border: 0; border-radius: 999px; background: rgba(20, 23, 31, .72); color: #fff;
    min-width: 30px; height: 30px; padding: 0 .6rem; font: inherit; font-size: .85rem; cursor: pointer;
}

.erklaerung {
    background: var(--hell); border-left: 4px solid var(--akzent); border-radius: var(--radius-klein);
    padding: .9rem 1rem; margin: .5rem 0 1rem; font-size: .95rem;
}
.unterschrift-feld {
    position: relative; border: 2px dashed var(--rand); border-radius: var(--radius); background: var(--weiss);
    height: 200px; touch-action: none;
}
.hat-unterschrift .unterschrift-feld { border-style: solid; border-color: var(--dunkel-3); }
.unterschrift-feld canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; z-index: 1; }
.unterschrift-linie {
    position: absolute; left: 1rem; right: 1rem; bottom: 2.2rem; border-top: 1px solid var(--rand);
    font-size: .8rem; color: var(--text-2); padding-top: .2rem; pointer-events: none;
}
.unterschrift-leeren { position: absolute; top: 8px; right: 8px; z-index: 2; }
@media (min-width: 900px) { .unterschrift-feld { height: 230px; max-width: 640px; } }

.unterschrift-ergebnis { display: grid; gap: .5rem; justify-items: start; }
.unterschrift-bild { max-width: 100%; width: 360px; border: 1px solid var(--rand); border-radius: var(--radius-klein); background: #fff; }
.hinweis-link { display: block; text-decoration: none; }

/* --------------------------------------------------------------------------
   Öffentliche Melde-Seiten (QR-Code)
   -------------------------------------------------------------------------- */
.portal .schlicht-inhalt { padding-top: 1.25rem; }
.portal-kopf { display: flex; justify-content: center; margin-bottom: 1rem; }
.portal-logo { max-height: 64px; max-width: 220px; object-fit: contain; }
.portal-firma { font-weight: 700; font-size: 1.25rem; }
.portal-titel h1 { margin: 0 0 .5rem; }
.portal-titel p { margin: 0; }
.portal-mitte { text-align: center; }
.portal .formular .karte h2 { margin-top: 0; }
.knopf-breit { width: 100%; }
.falle { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.sammel-liste { margin-top: .8rem; }
.sammel-liste:empty { display: none; }
.sammel-entfernen { position: absolute; top: 4px; right: 4px; }

.link-feld { width: 100%; font-size: .9rem; padding: .7rem .8rem; border: 1px solid var(--rand); border-radius: var(--radius-klein); background: var(--hell); }

.melde-schritte { list-style: none; margin: 1.2rem 0; padding: 0; display: grid; gap: .1rem; }
.melde-schritte li { display: flex; align-items: center; gap: .8rem; color: var(--text-2); position: relative; padding: .45rem 0; }
.melde-schritte li:not(:last-child)::after {
    content: ""; position: absolute; left: 15px; top: 38px; height: calc(100% - 30px); border-left: 2px solid var(--rand);
}
.melde-punkt {
    width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
    background: var(--hell); border: 2px solid var(--rand); font-weight: 600; font-size: .9rem;
}
.melde-punkt svg { width: 18px; height: 18px; }
.melde-schritte li.erledigt { color: var(--text); }
.melde-schritte li.erledigt .melde-punkt { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.melde-schritte li.aktuell { color: var(--text); font-weight: 700; }
.melde-schritte li.aktuell .melde-punkt { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }
.formular label.knopf { display: inline-flex; flex-direction: row; align-items: center; justify-content: center; gap: .5rem; }

/* ---------- Meldungen (Büro) ---------- */
.zaehler {
    display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
    background: var(--rot); color: #fff; font-size: .72rem; font-weight: 700; line-height: 1;
}
.nav-eintrag .zaehler { margin-left: auto; }
.mobil-eintrag { position: relative; }
.mobil-eintrag .zaehler { position: absolute; top: 4px; left: 50%; margin-left: 4px; }
.meldung-karte { flex-direction: row; align-items: stretch; gap: .9rem; border-left-color: var(--akzent); }
.meldung-bild { width: 84px; height: 84px; object-fit: cover; border-radius: var(--radius-klein); flex-shrink: 0; background: var(--hell); }
.meldung-text { display: flex; flex-direction: column; gap: .45rem; min-width: 0; flex: 1; }
.status-abgelehnt { background: #f2f4f7; color: #98a2b3; }
.qr-zeile { display: grid; gap: 1.2rem; align-items: start; }
@media (min-width: 700px) { .qr-zeile { grid-template-columns: 200px 1fr; } }
.qr-bild { width: 200px; max-width: 100%; border: 1px solid var(--rand); border-radius: var(--radius-klein); overflow: hidden; }
.qr-bild svg { display: block; width: 100%; height: auto; }
.qr-text { display: flex; flex-direction: column; gap: .9rem; }
.qr-text label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .9rem; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: .5rem; }
.kurzliste { margin: .4rem 0 0; padding-left: 1.2rem; }

/* ---------- Hof & Herausgabe ---------- */
.suchzeile-gross input[type="search"] { font-size: 1.2rem; min-height: 56px; text-transform: uppercase; }
.suchzeile-gross input[type="search"]::placeholder { text-transform: none; }
.kennzeichen-gross { font-size: 1.15rem; }
h1 .kennzeichen-gross { font-size: 1.5rem; }
.hof-karte { border-left-color: #067647; }
.hof-betrag { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.hof-betrag strong { font-size: 1.6rem; }
.hof-betrag span { color: var(--text-2); }

.positionen { display: grid; gap: .6rem; }
.position {
    display: grid; gap: .4rem; grid-template-columns: 1fr 1fr 1.3fr;
    padding-bottom: .6rem; border-bottom: 1px dashed var(--rand);
}
.position > input:first-child { grid-column: 1 / -1; }
.position output { grid-column: 1 / -1; text-align: right; font-weight: 600; }
.position-kopf { display: none; }
.position-summe { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.05rem; padding-top: .2rem; }
.position-summe strong { font-size: 1.4rem; }
@media (min-width: 700px) {
    .position { grid-template-columns: 3fr 1fr 1.2fr 1.3fr 1.2fr; align-items: center; border-bottom: 0; padding-bottom: 0; }
    .position > input:first-child, .position output { grid-column: auto; }
    .position-kopf { display: grid; font-size: .8rem; color: var(--text-2); font-weight: 600; }
    .position-kopf span:last-child { text-align: right; }
}

/* Preise & Leistungen */
.knopf-klein { min-height: 38px; padding: .4rem .8rem; font-size: .9rem; }
.kopf-zeile h2 { margin: 0; }
.karte > .kopf-zeile { margin-bottom: .5rem; }
.liste-rechts .preis { color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.feldsatz { border: 0; padding: 0; margin: .4rem 0 .2rem; display: flex; flex-direction: column; gap: .35rem; }
.feldsatz legend { font-weight: 600; padding: 0; margin-bottom: .35rem; }
.wochentage { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.preistabelle { display: flex; flex-direction: column; }
.formular label.preiszeile { display: grid; grid-template-columns: 1fr 8.5rem; gap: .75rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--rand); }
.preiszeile small { display: block; }
.preiszeile input { text-align: right; }
.preiszeile.inaktiv { opacity: .55; }
.tabelle { width: 100%; border-collapse: collapse; margin-top: .6rem; }
.tabelle th, .tabelle td { text-align: left; padding: .4rem .3rem; border-bottom: 1px solid var(--rand); vertical-align: top; }
.tabelle th { color: var(--text-2); font-weight: 600; }
.tabelle th.rechts, .tabelle td.rechts { text-align: right; white-space: nowrap; }
.knopfleiste { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.kennzahlen .karte { margin: 0; }
.kennzahlen strong { display: block; font-size: 1.4rem; }
details summary { cursor: pointer; font-weight: 600; padding: .3rem 0; }
.einfache-liste { margin: .4rem 0 0; padding-left: 1.1rem; }
.kosten-zeilen { width: 100%; border-collapse: collapse; }
.kosten-zeilen td { padding: .35rem 0; border-bottom: 1px solid var(--rand); vertical-align: top; }
.kosten-zeilen td:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; padding-left: .75rem; }
.kosten-zeilen tr.summe td { border-bottom: 0; font-weight: 700; font-size: 1.1rem; }
.text-rot { color: var(--rot); }

/* Rechnungen */
.position.mit-mwst { grid-template-columns: 1fr 1fr 1.3fr .9fr; }
@media (min-width: 700px) {
    .position.mit-mwst { grid-template-columns: 3fr .9fr 1.1fr 1.2fr .8fr 1.1fr; }
}
.rechnung-summen { width: 100%; max-width: 360px; margin-left: auto; border-collapse: collapse; }
.rechnung-summen td { padding: .25rem 0; }
.rechnung-summen td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.rechnung-summen tr.gesamt td { font-weight: 700; font-size: 1.15rem; border-top: 2px solid var(--text); padding-top: .4rem; }
.knopf-reihe { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.knopf-reihe form { margin: 0; }
.adresse-block { white-space: pre-line; }

/* ---------------------------------------------------------------- GPS: Dienst und Karte */
.dienst-leiste {
    display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
    background: var(--gruen-hell); border: 1px solid #b7e4c7; color: #0f5132;
    border-radius: var(--radius); padding: .5rem .75rem; margin-bottom: 1rem; font-size: .92rem;
}
.dienst-leiste > span:nth-of-type(2) { flex: 1; min-width: 12rem; }
.dienst-leiste.dienst-fehler { background: var(--rot-hell); border-color: #f5c2c2; color: #8a1c1c; }
.dienst-punkt { width: 10px; height: 10px; border-radius: 50%; background: var(--gruen); flex-shrink: 0;
    box-shadow: 0 0 0 0 rgba(31, 157, 85, .6); animation: dienst-puls 2s infinite; }
.dienst-fehler .dienst-punkt { background: var(--rot); animation: none; }
@keyframes dienst-puls { 70% { box-shadow: 0 0 0 8px rgba(31, 157, 85, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 157, 85, 0); } }
.dienst-karte { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.dienst-karte > div { flex: 1; min-width: 14rem; }
.dienst-karte p { margin: .25rem 0 0; }

.karte-layout { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .karte-layout { grid-template-columns: 1fr 320px; } }
.karte-feld { height: 62vh; min-height: 320px; border-radius: var(--radius); border: 1px solid var(--rand); }
@media (min-width: 1000px) { .karte-feld { height: calc(100vh - 210px); } }
.karte-seite { max-height: calc(100vh - 210px); overflow: auto; }
.karte-seite h2 { font-size: 1rem; margin: .25rem 0 .5rem; }
.karte-seite h2 + * { margin-top: 0; }
.karte-flaeche { position: relative; overflow: hidden; background: #e8e4da; touch-action: none; user-select: none; cursor: grab; }
.karte-flaeche:active { cursor: grabbing; }
.karte-kacheln img { position: absolute; left: 0; top: 0; width: 256px; height: 256px; max-width: none; }
.karte-marker { position: absolute; inset: 0; pointer-events: none; }
.karte-punkt {
    position: absolute; left: 0; top: 0; pointer-events: auto; border: 0; padding: 0; cursor: pointer;
    width: 0; height: 0; background: none;
}
.karte-punkt > span {
    position: absolute; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .72rem;
    border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}
.punkt-fahrer > span { width: 30px; height: 30px; left: -15px; top: -15px; border-radius: 50%; background: var(--gruen); color: #fff; z-index: 2; }
.punkt-fahrer.punkt-veraltet > span { background: #98a2b3; }
.punkt-auftrag > span { width: 22px; height: 22px; left: -11px; top: -26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
    background: #3538cd; color: #fff; }
.punkt-auftrag.status-neu > span { background: #d64545; }
.punkt-auftrag.status-unterwegs > span, .punkt-auftrag.status-vor_ort > span { background: #f2994a; }
.punkt-auftrag.punkt-dringend > span { width: 26px; height: 26px; left: -13px; top: -30px; }
.punkt-auftrag.punkt-auswahl > span { outline: 3px solid #111; }
.karte-punkt.status-neu, .karte-punkt.status-zugewiesen, .karte-punkt.status-unterwegs { background: none; }
.karte-blase {
    position: absolute; z-index: 5; max-width: 270px; background: #fff; border-radius: 10px; padding: .6rem .75rem;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .25); font-size: .88rem; line-height: 1.4; cursor: auto;
}
.karte-blase p { margin: .4rem 0 0; }
.karte-zoom { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 4px; z-index: 6; }
.karte-zoom button { width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--rand); background: #fff;
    font-size: 1.3rem; line-height: 1; cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.karte-quelle { position: absolute; right: 0; bottom: 0; background: rgba(255, 255, 255, .8); font-size: .7rem; padding: 1px 5px; z-index: 6; }
.karte-liste { list-style: none; margin: 0 0 1rem; padding: 0; }
.karte-liste li + li { border-top: 1px solid var(--rand); }
.karte-liste button { display: flex; gap: .6rem; align-items: center; width: 100%; text-align: left; background: none; border: 0;
    padding: .5rem .25rem; cursor: pointer; font: inherit; color: inherit; }
.karte-liste button:hover { background: #f6f7f9; }
.karte-liste small { display: block; color: #667085; }
.karte-kuerzel { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%;
    background: var(--gruen); color: #fff; font-size: .7rem; font-weight: 700; flex-shrink: 0; vertical-align: middle; }
.karte-kuerzel.veraltet { background: #98a2b3; }
.karte-kuerzel.auftrag { width: 18px; height: 18px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #3538cd; color: #fff; }
.karte-kuerzel.auftrag.status-neu { background: #d64545; color: #fff; }
.karte-kuerzel.auftrag.status-unterwegs, .karte-kuerzel.auftrag.status-vor_ort { background: #f2994a; color: #fff; }
.karte-legende { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: .75rem; align-items: center; }
.naechste-fahrer { list-style: none; padding: 0; margin: 0; }
.naechste-fahrer li { display: flex; align-items: center; gap: .75rem; padding: .55rem 0; }
.naechste-fahrer li + li { border-top: 1px solid var(--rand); }
.naechste-fahrer li > div { flex: 1; }
.naechste-fahrer small { display: block; color: #667085; }
.inline-form { display: inline-block; margin-left: .5rem; }
.liste-schlicht { list-style: none; padding: 0; margin: 0 0 1rem; }
.liste-schlicht li { padding: .45rem 0; border-top: 1px solid var(--rand); }
.liste-schlicht li:first-child { border-top: 0; }
.eingabe-kopieren { width: 100%; font-family: ui-monospace, monospace; padding: .6rem .75rem; border: 1px solid var(--rand); border-radius: 8px; background: #f6f7f9; }
