@font-face {
    font-family: "Lilita One";
    src: url("lilita-one.woff2") format("woff2");
    font-display: swap;
}

:root {
    /* Farben aus dem Spülfuchs-Logo: Blau der Schrift, Orange des Fuchses */
    --marke: #1f4e8c;
    --hintergrund: #f2f5f9;
    --flaeche: #ffffff;
    --text: #1f2328;
    --gedaempft: #5f6b7a;
    --linie: #d5dde7;
    --akzent: #2e74b5;
    --akzent-dunkel: #1f5fa8;
    --fuchs: #f9a62b;
    --fuchs-text: #2a1800;
    --gefahr: #b42318;
    --ok: #2f7d4f;
    --wochenende: #eef2f7;
    --heute: #fff1d6;
    --radius: 8px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--hintergrund); font-size: 15px; line-height: 1.45; }
a { color: var(--akzent-dunkel); }
h1 { font-size: 1.5rem; margin: 1.2rem 0 .8rem; }
h2 { font-size: 1.15rem; margin: 1.4rem 0 .6rem; }
small { color: var(--gedaempft); }

/* Icons */
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.btn .icon { width: 1.05em; height: 1.05em; }

/* Kopfzeile */
.kopf {
    display: flex; align-items: center; gap: 1rem;
    height: 56px; padding: 0 1rem; background: var(--marke); color: #fff;
    position: sticky; top: 0; z-index: 20; box-shadow: 0 1px 0 #00000033;
}
.kopf .logo { display: flex; align-items: center; gap: .55rem; color: #fff; text-decoration: none; flex: none; }
.logo-fuchs { width: 38px; height: 38px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #ffffff33; }
.logo-text { font-family: "Lilita One", system-ui, sans-serif; font-size: 1.35rem; letter-spacing: .01em; white-space: nowrap; display: flex; align-items: center; }
.logo-text .tropfen { width: 11px; height: 14px; color: #8ab8ff; margin-right: -1px; }
.logo-text .tropfen + .tropfen { margin-right: 5px; }
.hauptnavigation { display: flex; gap: .15rem; flex: 1; min-width: 0; }
.hauptnavigation a {
    position: relative; display: flex; align-items: center; gap: .45rem;
    color: #d6e2f2; text-decoration: none; padding: .45rem .7rem; border-radius: 8px; white-space: nowrap; font-size: .95rem;
}
.hauptnavigation a:hover { background: #ffffff14; color: #fff; }
.hauptnavigation a.aktiv { background: var(--fuchs); color: var(--fuchs-text); }
.hauptnavigation .icon { width: 18px; height: 18px; }
.nav-kurz { display: none; }
.punkt {
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--gefahr); color: #fff;
    font-size: .72rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
.hauptnavigation a.aktiv .punkt { background: var(--gefahr); color: #fff; }

.kopf-rechts { display: flex; align-items: center; gap: .35rem; flex: none; }
.kopf-suche { position: relative; display: flex; align-items: center; margin-right: .3rem; }
.kopf-suche .icon { position: absolute; left: .6rem; width: 16px; height: 16px; color: #a9bcd6; pointer-events: none; }
.kopf-suche input {
    width: 170px; height: 36px; padding: .3rem .6rem .3rem 2rem; border-radius: 8px;
    background: #ffffff14; border: 1px solid #ffffff26; color: #fff; transition: width .15s, background .15s;
}
.kopf-suche input::placeholder { color: #a9bcd6; }
.kopf-suche input:focus { width: 240px; background: #fff; color: var(--text); outline: none; border-color: #fff; }
.kopf-suche:focus-within .icon { color: var(--gedaempft); }
.kopf-icon {
    display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
    border-radius: 8px; color: #d6e2f2;
}
.kopf-icon:hover { background: #ffffff14; color: #fff; }
.kopf-icon.aktiv { background: var(--fuchs); color: var(--fuchs-text); }
.kopf-icon .icon { width: 20px; height: 20px; }
.nur-handy { display: none; }
.kopf-ich {
    position: relative; display: flex; flex-direction: row; align-items: center; gap: .45rem;
    height: 38px; padding: 0 .7rem 0 .3rem; border-radius: 19px; color: #fff; font-size: .9rem; cursor: pointer;
}
.kopf-ich:hover { background: #ffffff14; }
.kopf-ich select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.avatar {
    width: 30px; height: 30px; border-radius: 50%; background: #3d6aa6; color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem;
}
.avatar .icon { width: 16px; height: 16px; }
.kopf-ich.unbekannt .avatar { background: var(--fuchs); color: var(--fuchs-text); }
.kopf-ich.unbekannt .kopf-ich-name { color: #ffd08a; }
.kopf .kopf-neu { height: 38px; border-radius: 8px; background: var(--fuchs); border-color: var(--fuchs); color: var(--fuchs-text); }
.kopf .kopf-neu:hover { background: #ffb84d; border-color: #ffb84d; }
.kopf-neu .icon { width: 18px; height: 18px; }
.zahl.zahl-warnung, .btn.aktiv .zahl.zahl-warnung { background: var(--gefahr); color: #fff; }

@media (max-width: 1600px) {
    .kopf-neu span, .kopf-ich-name { display: none; }
    .kopf-neu { width: 38px; padding: 0; justify-content: center; }
    .kopf-ich { padding: 0 .2rem; }
}
@media (max-width: 1300px) {
    .hauptnavigation .nav-text { display: none; }
    .hauptnavigation a { padding: .5rem .65rem; }
    .hauptnavigation .punkt { position: absolute; top: 0; right: -2px; min-width: 16px; height: 16px; font-size: .65rem; }
}
@media (max-width: 900px) {
    .logo-text { display: none; }
}

main { max-width: 1100px; margin: 0 auto; padding: .5rem 1rem 3rem; }
body.breit main { max-width: none; }

/* Bedienelemente */
.btn {
    display: inline-flex; align-items: center; gap: .3rem; padding: .45rem .9rem;
    border: 1px solid var(--linie); border-radius: 6px; background: var(--flaeche);
    color: var(--text); font: inherit; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: #a9b6c6; }
.btn.aktiv { background: var(--marke); color: #fff; border-color: var(--marke); }
.btn-primaer { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.btn-primaer:hover { background: var(--akzent-dunkel); border-color: var(--akzent-dunkel); }
.btn-gefahr { color: var(--gefahr); }
.btn-gefahr:hover { border-color: var(--gefahr); }
.btn-klein { padding: .2rem .55rem; font-size: .85rem; }
.btn-icon { padding: .45rem .6rem; }
.btn-klein.btn-gefahr:has(.icon:only-child) { padding: .3rem .45rem; }
.btn-warnung { background: #fff4e0; border-color: #f0d08a; color: #7a4a00; }
.btn-warnung:hover { border-color: #d08a1e; }

input, select, textarea {
    font: inherit; padding: .4rem .55rem; border: 1px solid var(--linie);
    border-radius: 6px; background: #fff; color: var(--text); max-width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #2e74b555; border-color: var(--akzent); }
label { display: flex; flex-direction: column; gap: .2rem; font-size: .9rem; color: var(--gedaempft); }
label > input, label > select, label > textarea { color: var(--text); font-size: 1rem; }

.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: 1rem; }
.karte h2 { margin-top: 0; }
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem 1rem; margin-top: .6rem; }
.raster .breit { grid-column: 1 / -1; }
.aktionen { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
/* Speichern bleibt beim langen Auftragsformular immer sichtbar */
.auftrag-form > .aktionen {
    position: sticky; bottom: 0; z-index: 5; margin: 0 -1rem; padding: .7rem 1rem;
    background: #f2f5f9ee; backdrop-filter: blur(4px); border-top: 1px solid var(--linie);
}
/* Reiter als Segment-Schalter, daneben ein Filterfeld */
.werkzeugleiste { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; margin-bottom: 1rem; }
.reiter { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: #e3e9f0; border-radius: 10px; }
.reiter a { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .8rem; border-radius: 8px; color: var(--text); text-decoration: none; font-size: .92rem; white-space: nowrap; }
.reiter a:hover { background: #ffffff99; }
.reiter a.aktiv { background: var(--flaeche); box-shadow: 0 1px 3px #0000001f; font-weight: 600; }
.suchfeld { position: relative; display: flex; align-items: center; }
.suchfeld > .icon { position: absolute; left: .6rem; width: 16px; height: 16px; color: var(--gedaempft); pointer-events: none; }
.suchfeld input[type=search] { padding-left: 2rem; padding-right: 2rem; width: 240px; }
.suchfeld a { position: absolute; right: .5rem; color: var(--gedaempft); display: flex; }
.filter { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.hinweis { color: var(--gedaempft); font-size: .9rem; margin: .3rem 0; }
.leer-fuchs { display: flex; align-items: center; gap: 1rem; }
.leer-fuchs img { width: 96px; height: auto; flex: none; mix-blend-mode: multiply; }
.heute-leer { max-width: 640px; margin: 0 auto 1rem; }
.leer-hinweis { color: var(--gedaempft); padding: 1.5rem; background: var(--flaeche); border: 1px dashed var(--linie); border-radius: var(--radius); }

.meldung { padding: .7rem 1rem; border-radius: var(--radius); margin: .8rem 0; border: 1px solid; }
.meldung ul { margin: 0; padding-left: 1.2rem; }
.meldung-ok { background: #e8f4ec; border-color: #b5dbc2; color: #1e5a36; }
.meldung-fehler { background: #fdecea; border-color: #f3b9b3; color: #8a1c13; }

/* Tabellen */
.tabelle-rahmen { overflow-x: auto; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .5rem .75rem; border-bottom: 1px solid #e6ebf1; vertical-align: middle; }
th { font-size: .85rem; color: var(--gedaempft); font-weight: 600; background: #f7f9fb; }
tr:last-child td { border-bottom: 0; }
tr.st-reparatur td { background: #fff7e6; }
tr.st-verkauft td, tr.st-ausgemustert td { color: var(--gedaempft); }
.status-auswahl { padding: .2rem .4rem; font-size: .9rem; }
.typ-titel { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; }
.typ-titel small { font-weight: normal; font-size: .85rem; }
.liste { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: .6rem 1rem .6rem 2rem; }

/* Auftragsformular */
.optionen { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0; }
.option { flex-direction: row; align-items: center; gap: .4rem; padding: .45rem .8rem; border: 1px solid var(--linie); border-radius: 6px; color: var(--text); cursor: pointer; }
.option:has(input:checked) { border-color: var(--akzent); background: #e8f1fb; }
.maschinen-auswahl { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: .8rem; }
.typ-gruppe { border: 1px solid var(--linie); border-radius: var(--radius); padding: .4rem .7rem .7rem; margin: 0; min-width: 0; }
.typ-gruppe legend { padding: 0 .3rem; font-size: .9rem; }
.frei-anzahl { color: var(--gedaempft); }
.m-eintrag { padding: .3rem .4rem; border-radius: 6px; }
.m-eintrag > label { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .4rem; color: var(--text); cursor: pointer; }
.m-eintrag:has(input[type=checkbox]:checked) { background: #e8f1fb; }
.m-eintrag.belegt:not(:has(input[type=checkbox]:checked)) { opacity: .55; }
.m-eintrag.belegt .belegt-info { color: var(--gefahr); }
.m-eintrag:has(input[type=checkbox]:checked).belegt { background: #fdecea; outline: 1px solid var(--gefahr); }
.m-eintrag.vorgemerkt .belegt-info { color: #a85d00; }
.m-eintrag:has(input[type=checkbox]:checked).vorgemerkt { background: #fff4e0; outline: 1px dashed #d08a1e; }
.vorlaeufig-option { border-style: dashed; }
.vorlaeufig-option:has(input:checked) { border-color: #d08a1e; background: #fff4e0; }
.lieferhinweis { background: #fff7e6; border-left: 3px solid #d08a1e; padding: .4rem .6rem; border-radius: 4px; margin: .4rem 0; font-size: .92rem; color: var(--text); }
#bestaetigung summary { cursor: pointer; list-style: none; }
#bestaetigung summary h2 { display: inline; margin: 0; }
#bestaetigung summary::before { content: '▸ '; color: var(--gedaempft); }
#bestaetigung[open] summary::before { content: '▾ '; }
#bestaetigung textarea { width: 100%; font-size: .95rem; }
.verlauf { margin: 0; padding-left: 1.1rem; display: grid; gap: .3rem; font-size: .92rem; }
.m-eintrag .status { background: #fff1d6; color: #8a5a00; padding: 0 .35rem; border-radius: 4px; }
.koerbe { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .4rem; margin: .4rem 0 .2rem 1.5rem; }
.koerbe label { font-size: .8rem; }
.t-offen { padding: .3rem .4rem; margin-bottom: .2rem; border-radius: 6px; border: 1px dashed var(--linie); }
.t-offen > label { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .4rem; color: var(--gedaempft); }
.t-offen .t-anzahl { width: 4.2rem; }
.t-offen.aktiv { background: #eef4fb; border-color: var(--akzent); }
.t-offen.aktiv > label { color: var(--text); }
.t-offen.zu-viel { background: #fdecea; border-color: var(--gefahr); }
.t-hinweis { color: var(--gefahr); }
.koerbe input { width: 100%; padding: .25rem .4rem; }

/* Mitarbeiter */
.abw-liste .stamm-zeile { grid-template-columns: 150px 150px 140px 1fr 150px; min-width: 700px; }
.warnung { color: var(--gefahr); font-weight: 600; }
.meldung-warnung { background: #fff7e6; border-color: #f0d08a; color: #6b4a00; }

.korb-uebersicht { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 1rem; }
.korb-stand { font-size: .88rem; padding: .25rem .6rem; border-radius: 99px; background: #eef5f0; border: 1px solid #c9e0d0; }
.korb-stand.zu-viel { background: #fdecea; border-color: var(--gefahr); color: var(--gefahr); }

.zubehoer-auswahl { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem; }
.zubehoer-stand { padding: .4rem .6rem; border: 1px solid var(--linie); border-radius: 6px; color: var(--text); }
.zubehoer-stand input { width: 6rem; }
.zubehoer-stand.zu-viel { border-color: var(--gefahr); background: #fdecea; }
.zubehoer-stand.zu-viel .zubehoer-frei { color: var(--gefahr); }
.set-option { display: flex; flex-direction: column; gap: .5rem; }
.set-option:has(#setpreis:checked) > .option { border-color: var(--akzent); background: #e8f1fb; }
.set-felder { display: flex; flex-wrap: wrap; align-items: end; gap: .4rem 1rem; }
.set-felder label { max-width: 14rem; }
.set-ersparnis { font-size: .9rem; color: var(--ok); padding-bottom: .5rem; }
.set-ersparnis.fehler { color: var(--gefahr); }
.p-set { flex: none; align-self: center; margin-right: 4px; padding: 0 4px; border-radius: 3px; font-size: .65rem; font-weight: 700; line-height: 16px; background: var(--ok); color: #fff; pointer-events: none; }
.preis-vorschlag { font-size: .88rem; color: var(--text); display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }

/* Stammdaten */
.stamm-liste { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); overflow-x: auto; }
.stamm-zeile { display: grid; gap: .5rem; align-items: center; padding: .4rem .6rem; border-bottom: 1px solid #e6ebf1; min-width: 640px; }
.stamm-zeile:last-child { border-bottom: 0; }
.stamm-typ { grid-template-columns: 60px 2fr 1.2fr 80px 90px 90px 60px 150px; min-width: 860px; }
.stamm-korb { grid-template-columns: 1fr 110px 110px 150px; min-width: 480px; }
.stamm-ma { grid-template-columns: 1fr 1fr 1.3fr 110px 80px 150px; min-width: 800px; }
.stamm-kopf { font-size: .85rem; color: var(--gedaempft); font-weight: 600; background: #f7f9fb; }
.stamm-neu { background: #fafbfd; }
.stamm-zeile input { width: 100%; }
.knoepfe { display: flex; gap: .3rem; }

/* Ausgaben & Rückgaben */
.tag-titel { border-bottom: 2px solid var(--linie); padding-bottom: .2rem; }
.tag-titel.heute { border-color: var(--fuchs); }
.termin-liste { display: grid; gap: .6rem; }
.termin { background: var(--flaeche); border: 1px solid var(--linie); border-left: 5px solid var(--fuchs); border-radius: var(--radius); padding: .7rem 1rem; }
.termin.rueckgabe { border-left-color: #3b6ea8; }
.termin.erledigt { opacity: .6; }
.termin-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .4rem; }
.termin-kunde { font-weight: 700; font-size: 1.05rem; }
.termin-details { display: flex; flex-wrap: wrap; gap: .5rem 2rem; font-size: .92rem; }
.termin-details > * { flex: 1 1 220px; }
.termin-details .positionen { flex: 2 1 300px; }
.termin-zahlung { flex: 0 1 220px; }
.termin-kontakt a { text-decoration: none; }
.positionen { margin: 0; padding-left: 1.1rem; }
.notiz { background: #f7f9fb; padding: .4rem .6rem; border-radius: 6px; font-size: .9rem; margin: .5rem 0; }
.marke { display: inline-flex; align-items: center; gap: .25rem; font-size: .8rem; padding: .1rem .5rem; border-radius: 99px; background: #e6ebf1; }
.marke .icon { width: 13px; height: 13px; }
.warnung .icon { vertical-align: -.15em; }
.marke-ausgabe { background: #fde3d2; color: #8a3a0b; }
.marke-rueckgabe { background: #dbe7f5; color: #1f4b7f; }
.marke-lieferung { background: var(--marke); color: #fff; }
.marke-vorlaeufig { background: #fff4e0; color: #8a4f00; border: 1px dashed #d08a1e; font-weight: 600; }
.marke-ueberfaellig { background: var(--gefahr); color: #fff; font-weight: 600; }
/* DGUV-Prüfung: grün = gültig, gelb = bald fällig, rot = abgelaufen/nicht bestanden, grau = nicht eingetragen */
.dguv-ok { background: #e3f1e8; color: var(--ok); }
.dguv-bald { background: #fff4d6; color: #7a5200; font-weight: 600; }
.dguv-faellig { background: var(--gefahr); color: #fff; font-weight: 600; }
.dguv-fehlt { background: #eef0f3; color: var(--gedaempft); }
td .marke[class*="dguv-"] { white-space: nowrap; }
h2 .marke { font-size: .85rem; font-weight: normal; vertical-align: middle; }
.dguv-ergebnis { display: flex; flex-wrap: wrap; gap: .5rem; border: 0; padding: 0; margin: 0; }
.dguv-ergebnis legend { font-size: .9rem; color: var(--gedaempft); padding: 0; margin-bottom: .2rem; width: 100%; }
.dguv-hinweis .icon { vertical-align: -.15em; }
.termin.ueberfaellig { border-left-color: var(--gefahr); }
.termin form { margin-top: .5rem; }
.schnell { display: flex; flex-wrap: wrap; gap: .4rem; }
.zahl { background: #0000001a; border-radius: 99px; padding: 0 .45rem; font-size: .8rem; }
.btn.aktiv .zahl { background: #ffffff33; }
.summe { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: .6rem 1rem; }
.zahlung-offen { color: var(--gefahr); font-weight: 600; }
.zahlung-rechnung { color: #8a5a00; font-weight: 600; }
.zahlung-bezahlt { color: var(--ok); }

/* Heute (Handy) */
.heute-kopf { max-width: 640px; margin-left: auto !important; margin-right: auto !important; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1rem 0 .5rem; text-align: center; }
.heute-kopf h1 { margin: 0; }
.heute-filter { justify-content: center; }
.heute-liste { display: grid; gap: .8rem; max-width: 640px; margin: 0 auto; }
.heute-karte { background: var(--flaeche); border: 1px solid var(--linie); border-left: 6px solid var(--fuchs); border-radius: var(--radius); padding: .8rem 1rem; display: grid; gap: .45rem; }
.heute-karte.rueckgabe { border-left-color: #3b6ea8; }
.heute-karte.erledigt { opacity: .55; }
.heute-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.heute-zeit { font-size: 1.3rem; }
.heute-kunde { font-size: 1.2rem; font-weight: 700; }
.heute-knoepfe { display: flex; flex-wrap: wrap; gap: .5rem; }
.heute-knoepfe .btn, .heute-erledigt { padding: .7rem 1rem; font-size: 1rem; }
.heute-erledigt { width: 100%; justify-content: center; }
.mitarbeiter-kurz { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; }
.mitarbeiter-namen { display: flex; flex-wrap: wrap; gap: .4rem; }
.mitarbeiter-namen .marke { font-size: .9rem; padding: .25rem .7rem; color: var(--text); text-decoration: none; }
.mitarbeiter-namen .marke.inaktiv { opacity: .5; }
/* Doppelte Kunden */
.dublette-grund { display: flex; align-items: center; gap: .4rem; color: var(--gedaempft); font-size: .9rem; margin-bottom: .6rem; }
.dublette-paar { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .8rem; }
.dublette-kunde { display: block; border: 1px solid var(--linie); border-radius: var(--radius); padding: .7rem .9rem; color: var(--text); cursor: pointer; font-size: .92rem; }
.dublette-kunde:has(input:checked) { border-color: var(--akzent); background: #fff6e8; }
.dublette-kopf { display: flex; align-items: center; gap: .5rem; font-size: 1rem; }
.behalten-marke { display: none; margin-left: auto; font-size: .78rem; color: var(--akzent-dunkel); font-weight: 600; }
.dublette-kunde:has(input:checked) .behalten-marke { display: inline; }
.dublette-kunde dl { display: grid; grid-template-columns: max-content 1fr; gap: .2rem .8rem; margin: .6rem 0 0; }
.dublette-kunde dt { color: var(--gedaempft); }
.dublette-kunde dd { margin: 0; }
.zusammenfuehren { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--linie); }
/* Dialog (Rückgabe-Check) */
.dialog { border: 0; border-radius: 12px; padding: 1.2rem 1.4rem; width: min(520px, 94vw); box-shadow: 0 20px 60px #0004; }
.dialog::backdrop { background: #0f2a4d99; }
.dialog h2 { margin-top: 0; }
.rueckgabe-check, .rueckgabe-maschinen { display: grid; gap: .4rem; margin-bottom: .6rem; }
.option-schaden:has(input:checked) { border-color: var(--gefahr); background: #fdecea; }
#rueckgabe-schaden { display: grid; gap: .4rem; }
#rueckgabe-schaden textarea { width: 100%; }
/* Ladeliste */
.ladeliste .karte { margin: 0; }
.ladeliste h2 .icon, .ladeliste h3 { color: var(--gedaempft); }
.ladeliste h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; margin: .9rem 0 .2rem; }
.lade-titel { margin: .8rem 0 0; }
.lade-zeile { flex-direction: row; align-items: center; gap: .6rem; padding: .45rem .2rem; border-top: 1px solid #e6ebf1; color: var(--text); font-size: 1rem; cursor: pointer; }
.lade-zeile input { width: 22px; height: 22px; accent-color: var(--ok); flex: none; }
.lade-zeile:has(input:checked) span { text-decoration: line-through; color: var(--gedaempft); }

@media print {
    .kopf, .hauptnavigation, .nicht-drucken, .meldung { display: none !important; }
    body { background: #fff; padding: 0; font-size: 12pt; }
    main { max-width: none; padding: 0; }
    .heute-liste { max-width: none; }
    .heute-karte, .karte { break-inside: avoid; border-color: #999; box-shadow: none; }
    .heute-karte { border-left-width: 1px; }
    .heute-kunde { color: #000; text-decoration: none; }
    .lade-zeile input { accent-color: #000; }
}
.heute-fertig { color: var(--ok); font-weight: 600; }
.ueberfaellig-liste { margin-bottom: 1.5rem; }
.ueberfaellig-liste h2 { color: var(--gefahr); margin: .5rem 0 0; }
.heute-karte.ueberfaellig { border-left-color: var(--gefahr); background: #fdf3f2; }
.heute-knoepfe form { margin: 0; }

.import input, .import textarea { width: 100%; min-width: 120px; }
.import td { vertical-align: top; }
.import tr.doppelt td { background: #f3f6f9; }
.import td:first-child { width: 2rem; }

/* Auswertung */
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .8rem; margin: 1rem 0; }
.kennzahl { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: .8rem 1rem; display: grid; gap: .1rem; }
.kennzahl span { color: var(--gedaempft); font-size: .85rem; }
.kennzahl strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.monate { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px; align-items: end; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1rem .8rem .5rem; }
.monat { display: grid; grid-template-rows: auto 160px auto; text-align: center; gap: .2rem; cursor: default; }
.monat-saeule { display: flex; align-items: flex-end; justify-content: center; border-bottom: 1px solid var(--linie); }
.monat-saeule div { width: min(70%, 36px); background: var(--akzent); border-radius: 4px 4px 0 0; min-height: 0; }
.monat:hover .monat-saeule div { background: var(--akzent-dunkel); }
.monat-wert { font-size: .72rem; color: var(--gedaempft); font-variant-numeric: tabular-nums; min-height: 1em; }
.monat-name { font-size: .78rem; color: var(--gedaempft); }
.zahlen td { font-variant-numeric: tabular-nums; }
.quote { display: inline-block; width: 70px; height: 8px; background: #e6ebf1; border-radius: 4px; vertical-align: middle; overflow: hidden; }
.quote span { display: block; height: 100%; background: var(--ok); border-radius: 4px; }

/* Planer */
.p-ma .p-name, .p-korb .p-name { height: 28px; font-size: .88rem; }
.p-ma .p-tag { height: 28px; cursor: crosshair; display: flex; align-items: center; justify-content: center; }
.p-korb .p-tag { height: 24px; font-size: .75rem; color: var(--ok); display: flex; align-items: center; justify-content: center; font-weight: 600; }
.p-korb .p-tag.leer { color: var(--gefahr); }
.p-korb .p-name { height: 24px; }
.p-aufgabe { position: relative; z-index: 2; min-width: 18px; height: 18px; border-radius: 9px; background: var(--marke); color: #fff; font-size: .72rem; display: flex; align-items: center; justify-content: center; }
.p-aufgabe.konflikt { background: var(--gefahr); }
.p-abw {
    position: absolute; top: 3px; height: 22px; z-index: 1; border-radius: 4px; font-size: .75rem; line-height: 20px;
    padding: 0 5px; overflow: hidden; white-space: nowrap; text-decoration: none; color: #3c4f66;
    background: repeating-linear-gradient(135deg, #e3e9f1 0 6px, #d6dfea 6px 12px); border: 1px solid #9fb0c6;
}
.p-abw.abw-krank { background: repeating-linear-gradient(135deg, #f6dcd8 0 6px, #efcbc5 6px 12px); border-color: #d39a91; color: #7a2a20; }

/* Aufklapp-Menüs (details/summary) */
.aufklapp { position: relative; }
.aufklapp > summary { list-style: none; }
.aufklapp > summary::-webkit-details-marker { display: none; }
.aufklapp[open] > summary { border-color: #a9b6c6; box-shadow: 0 0 0 3px #2e74b51f; }
.aufklapp-inhalt {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 25; width: min(560px, 92vw);
    background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius);
    box-shadow: 0 10px 30px #0002; padding: .6rem .9rem;
}
.engpass-liste, .bedienung { list-style: none; margin: .3rem 0 0; padding: 0; max-height: 60vh; overflow: auto; }
.engpass-liste li { display: grid; grid-template-columns: 200px 1fr auto; gap: .8rem; padding: .4rem 0; border-top: 1px solid #e6ebf1; font-size: .9rem; }
.bedienung li { padding: .3rem 0; font-size: .9rem; border-top: 1px solid #e6ebf1; }
.bedienung li:first-child, .engpass-liste li:first-child { border-top: 0; }
.planer-leiste { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; margin: .8rem 0; }
.planer-leiste .gruppe { display: flex; flex-wrap: wrap; gap: .4rem; }
.planer {
    --name: 210px;
    overflow: auto; max-height: calc(100vh - 150px);
    background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius);
    user-select: none;
}
.planer .laden { padding: 2rem; color: var(--gedaempft); }
.p-zeile { display: flex; width: max-content; min-width: 100%; }
.p-name {
    position: sticky; left: 0; z-index: 2; flex: none; width: var(--name);
    padding: 0 .6rem; background: var(--flaeche); border-right: 1px solid var(--linie);
    border-bottom: 1px solid #e6ebf1; display: flex; align-items: center; gap: .3rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.p-spur { position: relative; display: flex; flex: none; width: calc(var(--tage) * var(--tag)); }
.p-tag { flex: none; width: var(--tag); border-right: 1px solid #e9eef4; border-bottom: 1px solid #e6ebf1; }
.p-tag.mo { border-left: 1px solid #c9d3df; }
.p-tag.we { background: var(--wochenende); }
.p-tag.heute { background: var(--heute); box-shadow: inset 2px 0 0 var(--fuchs), inset -2px 0 0 var(--fuchs); }

.p-kopf { position: sticky; top: 0; z-index: 4; }
.p-kopf .p-name { z-index: 5; font-weight: 600; color: var(--gedaempft); font-size: .85rem; align-items: flex-end; padding-bottom: .3rem; }
.p-kopf .p-tag {
    position: relative; height: 54px; background: #f7f9fb; display: flex; flex-direction: column;
    align-items: center; justify-content: flex-end; padding-bottom: .2rem; font-size: .72rem; color: var(--gedaempft);
}
.p-kopf .p-tag.we { background: #e4eaf2; }
.p-kopf .p-tag.heute { background: var(--heute); }
.p-kopf .p-tag b { font-size: .85rem; color: var(--text); }
.p-monat { position: absolute; top: 3px; left: 4px; font-weight: 700; color: var(--text); white-space: nowrap; z-index: 1; }

.p-gruppe .p-name { background: #eaf0f6; font-size: .85rem; height: 26px; }
.p-gruppe .p-tag { background: #eaf0f6; height: 26px; font-size: .72rem; color: var(--ok); display: flex; align-items: center; justify-content: center; font-weight: 600; }
.p-gruppe .p-tag.leer { color: var(--gefahr); }
.p-gruppe .p-tag.knapp { color: #b56a00; background: #fde9c8; }

.p-maschine .p-name { height: 32px; font-size: .9rem; }
.p-offen .p-name { height: 32px; font-size: .78rem; color: var(--gedaempft); font-style: italic; justify-content: flex-end; }
.p-offen .p-spur { background-image: repeating-linear-gradient(135deg, transparent 0 6px, #2e74b510 6px 12px); }
.p-balken.p-reserviert { border-style: dotted; border-width: 2px; line-height: 22px; }
.p-maschine .p-name a { font-weight: 600; text-decoration: none; }
.p-maschine .p-name small { background: #fff1d6; color: #8a5a00; padding: 0 .3rem; border-radius: 4px; }
.p-maschine .p-tag { height: 32px; cursor: crosshair; }
.p-maschine.st-reparatur .p-spur { background-image: repeating-linear-gradient(135deg, transparent 0 8px, #e9b44c22 8px 16px); }
.p-maschine.st-reparatur .p-tag { background-color: transparent; }
.p-maschine.st-verkauft .p-tag, .p-maschine.st-ausgemustert .p-tag { cursor: default; background: #eeeeee; }

.p-balken {
    position: absolute; top: 3px; height: 26px; z-index: 1;
    background: hsl(var(--farbe) 65% 86%); border: 1px solid hsl(var(--farbe) 45% 45%);
    border-radius: 5px; font-size: .8rem; line-height: 24px; color: hsl(var(--farbe) 50% 18%);
    cursor: grab; overflow: hidden; touch-action: none; display: flex;
}
.p-balken .text { flex: 1; padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.p-balken.ab-l { border-left-style: dashed; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.p-balken.ab-r { border-right-style: dashed; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.p-balken.st-ausgegeben { border-width: 2px; line-height: 22px; }
.p-balken.st-zurueck { opacity: .5; }
.p-balken.vorlaeufig { border-style: dashed; background: repeating-linear-gradient(135deg, hsl(var(--farbe) 65% 92%) 0 6px, hsl(var(--farbe) 65% 86%) 6px 12px); }
.p-balken.oben { height: 13px; line-height: 11px; font-size: .68rem; }
.p-balken.unten { top: 16px; height: 13px; line-height: 11px; font-size: .68rem; }
.p-balken.hervor { box-shadow: 0 0 0 2px hsl(var(--farbe) 60% 40%); z-index: 2; }
.p-balken.zieht { cursor: grabbing; opacity: .85; z-index: 3; pointer-events: none; box-shadow: 0 4px 12px #0003; }
.griff { flex: none; width: 7px; cursor: ew-resize; }
.griff:hover { background: hsl(var(--farbe) 45% 45% / .35); }
.p-auswahl { position: absolute; top: 3px; height: 26px; background: #2e74b533; border: 2px dashed var(--akzent); border-radius: 5px; pointer-events: none; z-index: 2; }

.toast {
    position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); z-index: 50;
    background: var(--marke); color: #fff; padding: .6rem 1rem; border-radius: var(--radius);
    white-space: pre-line; max-width: min(90vw, 600px); box-shadow: 0 6px 20px #0004;
}
.toast.fehler { background: var(--gefahr); }

@media (max-width: 700px) {
    .planer { --name: 92px; }
    /* Planer-Bedienung kompakt: Datum und Zeitraum teilen sich eine Zeile */
    .planer-leiste { margin: .5rem 0; gap: .4rem; }
    .planer-leiste .gruppe { width: 100%; }
    #planer-datum { flex: 1 1 9rem; min-width: 0; }
    #planer-wochen { flex: 1 1 7rem; min-width: 0; }
    /* Tippflächen fürs Handy (Apple empfiehlt mindestens 44 px) */
    .btn { min-height: 44px; }
    .btn-klein { min-height: 40px; padding: .3rem .7rem; }
    input, select { min-height: 44px; }
    input[type=checkbox], input[type=radio] { min-height: 0; width: 22px; height: 22px; flex: none; }
    .m-eintrag > label { min-height: 44px; }
    .heute-kunde, .termin-kunde { display: inline-block; padding: .35rem 0; }
    a[href^="tel:"] { display: inline-block; padding: .4rem 0; }
    .monat-wert { display: none; }
    /* Navigation als Leiste unten wie in einer App */
    body { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
    .kopf { height: 52px; gap: .5rem; padding: 0 .6rem; }
    .kopf-rechts { margin-left: auto; gap: .15rem; }
    .kopf-suche { display: none; }
    .nur-handy { display: inline-flex; }
    .hauptnavigation {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; gap: 0;
        background: var(--marke); padding: 4px 2px calc(4px + env(safe-area-inset-bottom)); box-shadow: 0 -1px 0 #00000033;
    }
    .hauptnavigation a { flex: 1; flex-direction: column; gap: 2px; padding: 5px 0; font-size: .66rem; min-width: 0; }
    .hauptnavigation .icon { width: 22px; height: 22px; }
    .hauptnavigation .nav-text { display: none; }
    .hauptnavigation .nav-kurz { display: block; }
    .hauptnavigation a.aktiv { background: none; color: var(--fuchs); }
    .hauptnavigation .punkt { position: absolute; top: 1px; left: calc(50% + 6px); right: auto; }
    .toast { bottom: calc(72px + env(safe-area-inset-bottom)); }
    .auftrag-form > .aktionen { bottom: calc(62px + env(safe-area-inset-bottom)); flex-wrap: nowrap; }
    .auftrag-form > .aktionen .btn-text, .auftrag-form > .aktionen .btn-abbrechen { display: none; }
    .auftrag-form > .aktionen .btn-primaer { flex: 1; justify-content: center; }
    .reiter { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
    .suchfeld, .suchfeld input[type=search] { width: 100%; }
    h1 { font-size: 1.3rem; }
}
/* Sehr schmal, z. B. iPhone mit großer Schrift oder Zoom */
@media (max-width: 380px) {
    main { padding-left: .6rem; padding-right: .6rem; }
    .karte { padding: .8rem .8rem; }
    .auftrag-form > .aktionen { margin: 0 -.6rem; padding: .6rem; }
    .hauptnavigation a { font-size: .58rem; }
    .hauptnavigation .nav-kurz { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .planer { --name: 72px; }
    .p-name { padding: 0 .35rem; }
    .koerbe { grid-template-columns: 1fr 1fr; margin-left: 0; }
}

/* Anmeldeseite (nur auf dem öffentlichen Server) */
.login-seite { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 2rem 1.5rem; max-width: 380px; width: 100%; text-align: center; }
.login-fuchs { width: 96px; height: auto; }
.login-karte h1 { font-family: "Lilita One", system-ui, sans-serif; color: var(--marke); font-weight: normal; margin: .3rem 0 1rem; }
.login-knoepfe { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.login-anbieter { flex-direction: column; align-items: stretch; margin-top: 1rem; }
.login-anbieter .btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; padding: .75rem 1.2rem; font-size: 1rem; background: #fff; color: var(--text); border: 1px solid var(--linie); }
.login-anbieter .btn:hover { background: #f4f6f9; }
