:root { --rot:#E40000; --rot-dunkel:#B30000; --schwarz:#111; --grau:#6b6b6b; --linie:#e5e5e5; --hell:#f5f5f5;
  --flaeche:#fafafa; --gruen:#1f8a3b; --gelb:#d49a00; --ampelrot:#c62828; --nav:220px; }
* { box-sizing:border-box; }
body { margin:0; font-family:Outfit, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; color:var(--schwarz); background:var(--flaeche); font-size:15px; }
a { color:var(--rot); text-decoration:none; } a:hover { text-decoration:underline; }

/* Navigation links */
aside.seite { position:fixed; inset:0 auto 0 0; width:var(--nav); background:var(--schwarz); color:#fff; overflow-y:auto; padding:18px 0; }
.logo { display:block; padding:0 20px 18px; color:#fff; border-bottom:1px solid #2a2a2a; margin-bottom:10px; }
.logo:hover { text-decoration:none; } .logo b { color:var(--rot); display:block; letter-spacing:1px; font-size:18px; } .logo span { font-size:14px; color:#ddd; }
.nav-titel { font-size:11px; text-transform:uppercase; letter-spacing:.8px; color:#888; padding:16px 20px 6px; }
nav a { display:flex; align-items:center; justify-content:space-between; color:#ddd; padding:9px 20px; border-left:3px solid transparent; }
nav a:hover { background:#1d1d1d; color:#fff; text-decoration:none; }
nav a.aktiv { background:#1d1d1d; color:#fff; border-left-color:var(--rot); font-weight:500; }
nav b { background:var(--rot); color:#fff; border-radius:9px; padding:0 7px; font-size:12px; font-weight:500; } nav b:empty { display:none; }
main { margin-left:var(--nav); padding:26px 32px 80px; min-height:100vh; }

h1 { font-size:26px; margin:0 0 18px; } h2 { font-size:17px; margin:0 0 12px; } h3 { font-size:14px; margin:14px 0 8px; }
.kopf { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:18px; } .kopf h1 { margin:0; } .kopf .rechts { margin-left:auto; }
.leiste { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:14px; } .leiste .rechts { margin-left:auto; }
input, select, textarea { font:inherit; padding:8px 10px; border:1px solid #cfcfcf; border-radius:6px; background:#fff; color:inherit; }
input:focus, select:focus, textarea:focus { outline:2px solid var(--rot); outline-offset:-1px; border-color:var(--rot); }
textarea { width:100%; min-height:90px; resize:vertical; }
button, .btn { font:inherit; font-weight:500; padding:8px 14px; border-radius:6px; border:1px solid var(--schwarz); background:#fff; color:var(--schwarz); cursor:pointer; display:inline-block; white-space:nowrap; }
button:hover, .btn:hover { background:var(--hell); text-decoration:none; }
button.primaer, .btn.primaer { background:var(--rot); border-color:var(--rot); color:#fff; } button.primaer:hover, .btn.primaer:hover { background:var(--rot-dunkel); }
button.klein, .btn.klein { padding:4px 9px; font-size:13px; } button.link { border:none; background:none; color:var(--rot); padding:0; font-weight:400; }
button.leise { border-color:#d5d5d5; color:#555; }
button:disabled { opacity:.5; cursor:default; }

table { width:100%; border-collapse:collapse; background:#fff; } th, td { text-align:left; padding:9px 10px; border-bottom:1px solid var(--linie); vertical-align:middle; }
th { font-size:11.5px; text-transform:uppercase; letter-spacing:.4px; color:var(--grau); font-weight:500; background:#fff; position:sticky; top:0; }
tr.klick { cursor:pointer; } tr.klick:hover td { background:#fff6f6; }
td.zahl, th.zahl { text-align:right; white-space:nowrap; }
.tabelle { background:#fff; border:1px solid var(--linie); border-radius:10px; overflow:auto; }
.tabelle tr:last-child td { border-bottom:none; }
.klein-text { color:var(--grau); font-size:13px; }

.raster { display:grid; gap:18px; align-items:start; } .raster.zwei { grid-template-columns:repeat(2, minmax(0, 1fr)); }
.raster.material { grid-template-columns:300px minmax(0, 1fr); }
@media (max-width:1100px) { .raster.zwei, .raster.material { grid-template-columns:1fr; } }
.karte { background:#fff; border:1px solid var(--linie); border-radius:10px; padding:18px; }
.karte > h2 { display:flex; align-items:center; gap:8px; } .karte > h2 .rechts { margin-left:auto; }
.kacheln { display:grid; grid-template-columns:repeat(auto-fill, minmax(190px, 1fr)); gap:14px; margin-bottom:22px; }
.kachel { background:#fff; border:1px solid var(--linie); border-radius:10px; padding:16px; color:inherit; }
.kachel:hover { border-color:var(--schwarz); text-decoration:none; }
.kachel .zahl { font-size:30px; font-weight:700; } .kachel.warn .zahl { color:var(--rot); }

.formular { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px 16px; }
.formular.drei { grid-template-columns:repeat(3, minmax(0, 1fr)); }
.formular label { display:flex; flex-direction:column; gap:4px; font-size:13px; color:var(--grau); }
.formular label.breit, .formular .breit { grid-column:1 / -1; }
.formular input, .formular select, .formular textarea { color:var(--schwarz); width:100%; }
@media (max-width:700px) { .formular, .formular.drei { grid-template-columns:1fr; } }
.zaehler { font-size:12px; color:var(--grau); text-align:right; } .zaehler.voll { color:var(--rot); font-weight:700; }

.ampel { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; font-size:13px; }
.ampel::before { content:""; width:10px; height:10px; border-radius:50%; background:#bbb; }
.ampel.gruen::before { background:var(--gruen); } .ampel.gelb::before { background:var(--gelb); } .ampel.rot::before { background:var(--ampelrot); }
.marke { display:inline-block; font-size:11px; font-weight:500; padding:2px 8px; border-radius:10px; background:var(--hell); border:1px solid var(--linie); white-space:nowrap; }
.marke.rot { background:var(--rot); border-color:var(--rot); color:#fff; } .marke.schwarz { background:var(--schwarz); color:#fff; border-color:var(--schwarz); }
.bild-mini { width:44px; height:44px; object-fit:contain; border:1px solid var(--linie); border-radius:6px; background:#fff; display:block; }
.platz { width:44px; height:44px; border:1px dashed #ccc; border-radius:6px; }

/* Drag & Drop */
.ablage { border:2px dashed #cfcfcf; border-radius:10px; padding:16px; text-align:center; color:var(--grau); font-size:13px; cursor:pointer; background:#fff; transition:all .15s; position:relative; }
.ablage:hover { border-color:#999; } .ablage.drueber { border-color:var(--rot); background:#fff4f4; color:var(--rot); }
.ablage.bild { min-height:220px; display:flex; align-items:center; justify-content:center; padding:10px; }
.ablage.bild img { max-width:100%; max-height:260px; object-fit:contain; display:block; }
.ablage .symbol { font-size:26px; display:block; margin-bottom:4px; }
.ablage.lädt::after { content:"wird hochgeladen …"; position:absolute; inset:0; display:flex; align-items:center; justify-content:center; background:rgba(255,255,255,.85); color:var(--schwarz); border-radius:8px; }
.datei-zeile { display:flex; align-items:center; gap:8px; background:var(--hell); border-radius:8px; padding:8px 10px; font-size:13px; }
.datei-zeile a { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* Angebotskarten */
.angebote { display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:14px; }
.angebot { background:#fff; border:1px solid var(--linie); border-radius:10px; padding:16px; display:flex; flex-direction:column; gap:10px; }
.angebot.gilt { border-color:var(--rot); box-shadow:0 0 0 1px var(--rot) inset; }
.angebot .preis { font-size:24px; font-weight:700; } .angebot .zeile { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.angebot .zeile .rechts { margin-left:auto; } .angebot hr { border:none; border-top:1px solid var(--linie); margin:2px 0; width:100%; }
.angebot textarea { min-height:54px; font-size:13px; }
.sterne { display:inline-flex; } .sterne button { border:none; background:none; font-size:22px; padding:0 1px; color:#d0d0d0; line-height:1; }
.sterne button.an { color:var(--rot); } .sterne button:hover { background:none; }
.stern-anzeige { color:var(--rot); letter-spacing:1px; } .stern-anzeige i { color:#d0d0d0; font-style:normal; }

.hinweis { background:#fff4f4; border-left:4px solid var(--rot); padding:10px 14px; border-radius:4px; margin:0 0 14px; }
.ok-box { background:#f1f8f3; border-left:4px solid var(--gruen); padding:10px 14px; border-radius:4px; margin:0 0 14px; }
.leer { color:var(--grau); padding:30px 0; text-align:center; }
pre.bestelltext { white-space:pre-wrap; background:#fff; border:1px solid var(--linie); padding:16px; border-radius:10px; font-family:inherit; margin:0; }
#toast { position:fixed; bottom:20px; left:calc(50% + var(--nav) / 2); transform:translateX(-50%); background:var(--schwarz); color:#fff; padding:10px 18px; border-radius:8px; opacity:0; transition:opacity .2s; pointer-events:none; z-index:50; }
#toast.zeigen { opacity:1; } #toast.fehler { background:var(--rot); }
dialog { border:none; border-radius:12px; padding:22px; width:min(860px, 94vw); box-shadow:0 10px 40px rgba(0,0,0,.25); }
dialog::backdrop { background:rgba(0,0,0,.4); }
.seiten { display:flex; gap:8px; align-items:center; margin-top:12px; }

@media (max-width:760px) {
  aside.seite { position:static; width:auto; } main { margin-left:0; padding:18px 14px; }
  nav { display:flex; flex-wrap:wrap; } .nav-titel { display:none; } nav a { padding:8px 12px; }
  table { display:block; overflow-x:auto; white-space:nowrap; } #toast { left:50%; }
}
@media print { aside.seite, .leiste, button, .nicht-drucken { display:none !important; } main { margin:0; padding:0; } body { background:#fff; } }
input[type=range] { accent-color:var(--rot); }

/* Eigene Auswahlfelder statt der macOS-Standardfelder */
.auswahl { position:relative; display:inline-block; min-width:160px; vertical-align:middle; }
.formular .auswahl, .auswahl.vorschlag { display:block; width:100%; }
.auswahl > select { position:absolute; inset:0; opacity:0; pointer-events:none; width:100%; }
.auswahl-knopf { width:100%; display:flex; align-items:center; justify-content:space-between; gap:10px; text-align:left;
  font-weight:400; border:1px solid #cfcfcf; border-radius:6px; padding:8px 10px; background:#fff; color:var(--schwarz); }
.auswahl-knopf span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.auswahl-knopf svg { flex:none; color:var(--grau); }
.auswahl-knopf:hover { background:#fff; border-color:#999; }
.auswahl-knopf:focus { outline:2px solid var(--rot); outline-offset:-1px; border-color:var(--rot); }
.auswahl-knopf.leer span { color:var(--grau); } .auswahl-knopf.ungueltig { border-color:var(--rot); }
.auswahl-liste { position:fixed; max-width:460px; z-index:60; background:#fff;
  border:1px solid var(--linie); border-radius:8px; box-shadow:0 8px 24px rgba(0,0,0,.14); padding:4px; }
.auswahl-suche { width:100%; margin-bottom:4px; }
.auswahl-eintraege { max-height:280px; overflow-y:auto; }
.auswahl-eintrag { display:flex; justify-content:space-between; gap:14px; padding:7px 10px; border-radius:5px; cursor:pointer; white-space:nowrap; }
.auswahl-eintrag.aktiv { background:#fff0f0; } .auswahl-eintrag.gewaehlt { font-weight:500; color:var(--rot); }
.auswahl-eintrag .klein-text { font-weight:400; }
.auswahl-leer { padding:8px 10px; color:var(--grau); font-size:13px; }
input[type=checkbox] { accent-color:var(--rot); width:16px; height:16px; vertical-align:middle; cursor:pointer; }
.haken { display:flex; align-items:center; gap:8px; margin-top:10px; font-size:13px; cursor:pointer; }

/* Dialoge */
dialog.klein { width:min(520px, 94vw); } dialog.breit { width:min(1100px, 96vw); }
.frage-zeile { display:flex; align-items:center; gap:10px; flex-wrap:wrap; font-size:15px; }
table.sammel td { vertical-align:middle; } table.sammel input { padding:6px 8px; }

/* Mehrfachauswahl */
.aktionsleiste { display:none; position:sticky; top:0; z-index:20; align-items:center; gap:10px; flex-wrap:wrap;
  background:var(--schwarz); color:#fff; padding:10px 14px; border-radius:10px; margin-bottom:12px; }
.aktionsleiste.sichtbar { display:flex; } .aktionsleiste button.link { color:#fff; text-decoration:underline; }
.aktionsleiste button:not(.primaer):not(.link) { background:#fff; }
tr.markiert td { background:#fff4f4; }

/* Fortschrittsbalken beim Import */
.fortschritt { background:var(--hell); border-radius:8px; padding:12px 14px; }
.fortschritt-text { display:flex; justify-content:space-between; gap:12px; font-size:13px; margin-bottom:8px; }
.fortschritt-spur { height:10px; background:#e2e2e2; border-radius:5px; overflow:hidden; }
.fortschritt-balken { height:100%; background:var(--rot); border-radius:5px; transition:width .3s; }
.fortschritt-balken.unbestimmt { background:linear-gradient(90deg, var(--rot) 0 30%, #f3b0b0 30% 60%, var(--rot) 60%); background-size:200% 100%; animation:laufen 1.2s linear infinite; }
@keyframes laufen { from { background-position:100% 0; } to { background-position:-100% 0; } }

/* V1.7: Bild am Händlerartikel, Import-Protokoll */
.angebot-kopf { display:grid; grid-template-columns:1fr 84px; gap:10px; align-items:start; }
.angebot-kopf > div:first-child { display:flex; flex-direction:column; gap:8px; min-width:0; }
.ha-bild-feld { display:flex; flex-direction:column; gap:2px; }
.ablage.ha-bild { width:84px; height:84px; padding:0; display:flex; align-items:center; justify-content:center; font-size:11px; line-height:1.3; border-width:1px; overflow:hidden; }
.ablage.ha-bild img { width:100%; height:100%; object-fit:contain; display:block; }
.ablage.ha-bild.lädt::after { content:"…"; }
.mit-bild { display:flex; gap:10px; align-items:center; }
.klick-bild { cursor:zoom-in; flex:none; }
.rechnung { width:100%; background:transparent; }
.rechnung td { padding:3px 6px; border:none; font-size:13px; }
.rechnung tr.summe td { border-top:1px solid #999; font-weight:700; }
.bericht { margin-top:8px; }
tr.imp-details > td { background:#fafafa; padding:12px 14px; }
tr.klick.offen td { background:#fff4f4; }

/* V1.8: Menü, Rückgängig */
.menue-zelle { text-align:right; width:44px; }
.menue-knopf { font-size:18px; line-height:1; padding:4px 10px; }
.dialog-info { font-size:14px; } .dialog-info ul { padding-left:18px; margin:6px 0; } .dialog-info p { margin:6px 0; }
tr.zurueckgenommen td { color:var(--grau); text-decoration:line-through; } tr.zurueckgenommen td .marke, tr.zurueckgenommen td .klein-text { text-decoration:none; }
.link-knoepfe .btn { white-space:nowrap; } .kopf .link-knoepfe { margin-left:12px; } td .link-knoepfe { gap:6px; flex-wrap:nowrap; }
/* Bildbibliothek */
.bib-neu { padding:18px; text-align:center; }
.bib-raster { display:grid; grid-template-columns:repeat(auto-fill, minmax(130px, 1fr)); gap:10px; max-height:52vh; overflow:auto; padding:2px; }
.bib-kachel { display:flex; flex-direction:column; gap:4px; align-items:stretch; padding:8px; background:#fff; border:1px solid var(--linie); border-radius:8px; cursor:pointer; text-align:left; font:inherit; }
.bib-kachel:hover, .bib-kachel:focus { border-color:var(--rot, #D01414); outline:none; }
.bib-kachel img { width:100%; aspect-ratio:1; object-fit:contain; background:#fff; border-radius:4px; }
.bib-pdf { font-size:42px; text-align:center; padding:18px 0; }
.bib-text { font-size:12px; line-height:1.3; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
tr.klick-ha { cursor:pointer; } tr.klick-ha:hover td { background:#fafafa; }
table.daten th { text-align:left; font-weight:600; vertical-align:top; color:#555; font-size:13px; text-transform:none; letter-spacing:0; }
[data-ziehbild] { cursor:grab; }
.haken-zelle { cursor:pointer; }
.datei-raster { display:grid; grid-template-columns:repeat(auto-fill, minmax(170px, 1fr)); gap:12px; }
.datei-karte { position:relative; display:flex; flex-direction:column; gap:6px; padding:10px; background:#fff; border:1px solid var(--linie); border-radius:10px; }
.datei-karte.markiert { border-color:var(--rot); box-shadow:0 0 0 2px rgba(228,0,0,.15); }
.datei-karte img { width:100%; aspect-ratio:1; object-fit:contain; cursor:zoom-in; }
.datei-karte .bib-pdf { display:block; text-align:center; text-decoration:none; }
.datei-haken { position:absolute; top:6px; left:6px; background:#fff; border-radius:4px; padding:2px 4px; cursor:pointer; }
.datei-karte button { align-self:flex-start; }
/* Anmeldung */
body.abgemeldet aside.seite { display:none; } body.abgemeldet main { margin-left:0; }
.anmeldung { min-height:80vh; display:flex; align-items:center; justify-content:center; }
.anmeldung .karte { width:min(420px, 94vw); padding:28px; }
.logo-gross { display:flex; flex-direction:column; margin-bottom:10px; } .logo-gross b { color:var(--rot); font-size:24px; letter-spacing:1px; } .logo-gross span { font-size:14px; }
.formular.einspaltig { grid-template-columns:1fr; }
#konto { margin-top:14px; } .konto-name { padding:6px 20px; color:#fff; font-weight:500; }
/* ---------- Seitenleiste wie plancraft: Icons, einklappbar, Konto unten ---------- */
:root { --nav:236px; --nav-zu:64px; }
aside.seite { display:flex; flex-direction:column; padding:12px 0 0; overflow:visible; transition:width .18s ease; z-index:30; }
main { transition:margin-left .18s ease; }
.seite-kopf { display:flex; align-items:center; gap:6px; padding:0 10px 12px 12px; border-bottom:1px solid #2a2a2a; margin-bottom:8px; }
.seite-kopf .logo { display:flex; align-items:center; gap:10px; padding:4px; border:none; margin:0; flex:1; min-width:0; }
.logo-zeichen { flex:0 0 32px; height:32px; border-radius:8px; background:var(--rot); color:#fff; font-weight:700; font-size:13px; display:flex; align-items:center; justify-content:center; letter-spacing:.5px; }
.logo-text { display:flex; flex-direction:column; min-width:0; line-height:1.2; } .logo-text b { color:#fff !important; font-size:14px !important; letter-spacing:0 !important; white-space:nowrap; } .logo-text span { font-size:12px; color:#aaa; }
.einklappen { background:none; border:none; color:#aaa; padding:6px; border-radius:6px; cursor:pointer; display:flex; } .einklappen:hover { background:#222; color:#fff; }
#nav { flex:1; overflow-y:auto; padding:0 8px; }
#nav a { gap:12px; justify-content:flex-start; padding:9px 12px; border-left:none; border-radius:8px; margin-bottom:2px; white-space:nowrap; }
#nav a.aktiv { background:#262626; border-left:none; }
#nav a b { margin-left:auto; }
.ic { width:19px; height:19px; flex:0 0 19px; }
.nav-trenner { height:1px; background:#2a2a2a; margin:8px 4px; }
.seite-fuss { display:flex; align-items:center; gap:6px; padding:10px 12px; border-top:1px solid #2a2a2a; position:relative; }
.fuss-knopf { display:flex; padding:8px; border-radius:8px; color:#bbb; } .fuss-knopf:hover, .fuss-knopf.aktiv { background:#262626; color:#fff; text-decoration:none; }
#konto-platz { margin-left:auto; }
.avatar { width:34px; height:34px; border-radius:50%; background:var(--rot); color:#fff; font-weight:600; font-size:13px; display:flex; align-items:center; justify-content:center; border:2px solid #333; cursor:pointer; padding:0; }
.avatar:hover { border-color:#666; }
.konto-menue { position:absolute; bottom:58px; left:10px; width:220px; background:#fff; color:var(--schwarz); border-radius:10px; box-shadow:0 10px 30px rgba(0,0,0,.35); padding:6px; z-index:50; }
.konto-menue .wer { padding:10px 10px 8px; border-bottom:1px solid var(--linie); margin-bottom:4px; } .konto-menue .wer b { display:block; } .konto-menue .wer span { font-size:12px; color:var(--grau); }
.konto-menue a { display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:6px; color:var(--schwarz); } .konto-menue a:hover { background:var(--hell); text-decoration:none; }
/* eingeklappt */
body.nav-zu aside.seite { width:var(--nav-zu); } body.nav-zu main { margin-left:var(--nav-zu); }
body.nav-zu .logo-text, body.nav-zu .nav-text { display:none; }
body.nav-zu .seite-kopf { flex-direction:column; padding:0 8px 10px; } body.nav-zu .seite-kopf .logo { justify-content:center; }
body.nav-zu .einklappen svg { transform:scaleX(-1); }
body.nav-zu #nav a { justify-content:center; padding:10px 0; position:relative; }
body.nav-zu #nav a b { position:absolute; top:4px; right:8px; padding:0; min-width:8px; height:8px; font-size:0; border-radius:50%; }
body.nav-zu .seite-fuss { flex-direction:column; padding:10px 0; } body.nav-zu #konto-platz { margin:0; }
body.nav-zu .konto-menue { left:8px; }
@media (max-width:760px) {
  aside.seite { flex-direction:column; } .einklappen { display:none; } #nav { display:flex; flex-wrap:wrap; } .nav-trenner { display:none; }
  body.nav-zu main { margin-left:0; } .konto-menue { bottom:auto; top:56px; }
}
/* Einstellungen: Menü links, Inhalt rechts */
.einst { display:flex; margin:-26px -32px -80px; min-height:100vh; }
.einst-menue { width:250px; flex:0 0 250px; background:#fff; border-right:1px solid var(--linie); padding:22px 12px; }
.einst-menue h1 { font-size:20px; padding:0 10px; margin-bottom:14px; }
.einst-titel { font-size:11px; text-transform:uppercase; letter-spacing:.8px; color:var(--grau); padding:14px 10px 6px; }
.einst-menue a { display:block; padding:8px 10px; border-radius:8px; color:var(--schwarz); } .einst-menue a:hover { background:var(--hell); text-decoration:none; }
.einst-menue a.aktiv { background:#efefef; font-weight:500; }
.einst-inhalt { flex:1; min-width:0; padding:26px 32px 80px; }
.kommission-knopf { max-width:260px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bestell-leiste { margin:14px 0 0; } .bestell-leiste select { margin-left:6px; }
.marke.gruen { background:#e6f4ea; color:var(--gruen); }
@media (max-width:760px) { .einst { flex-direction:column; margin:-18px -14px; } .einst-menue { width:auto; flex:none; border-right:none; border-bottom:1px solid var(--linie); } .einst-inhalt { padding:18px 14px; } }
nav.einst-menue a { display:block; color:var(--schwarz); border-left:none; } nav.einst-menue a:hover { color:var(--schwarz); background:var(--hell); }
nav.einst-menue a.aktiv { background:#ececec; color:var(--schwarz); border-left:none; font-weight:600; }
.formular label .marke { align-self:flex-start; margin-bottom:2px; }
