/* Web-Bestandsmanager – Aussehen wie die Stall-App (Burgund, Bricolage Grotesque / Figtree, lokal ausgeliefert) */
@font-face { font-family: "Bricolage Grotesque"; font-weight: 700; font-display: swap; src: url(schrift/BricolageGrotesque-700-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 700; font-display: swap; src: url(schrift/BricolageGrotesque-700-latin-ext.woff2) format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 800; font-display: swap; src: url(schrift/BricolageGrotesque-800-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 800; font-display: swap; src: url(schrift/BricolageGrotesque-800-latin-ext.woff2) format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: Figtree; font-weight: 400; font-display: swap; src: url(schrift/Figtree-400-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: Figtree; font-weight: 400; font-display: swap; src: url(schrift/Figtree-400-latin-ext.woff2) format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: Figtree; font-weight: 600; font-display: swap; src: url(schrift/Figtree-600-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: Figtree; font-weight: 600; font-display: swap; src: url(schrift/Figtree-600-latin-ext.woff2) format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: Figtree; font-weight: 700; font-display: swap; src: url(schrift/Figtree-700-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: Figtree; font-weight: 700; font-display: swap; src: url(schrift/Figtree-700-latin-ext.woff2) format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF; }

:root {
  --rot: #7C272E; --rot-sanft: #F6EFEF; --kopf: #7C272E; --tief: #5A1A20; --kamm: #D42A30;
  --tinte: #212121; --grau: #5E5656; --linie: #E6DADB; --grund: #FBF8F8; --karte: #FFFFFF;
  --gruen: #2F7D34; --gruen-sanft: #E6F2E6; --ocker: #8A6400; --ocker-sanft: #FFF3CC;
  --plan-boden: #EEF0E8; --plan-strasse: #D9D2CF; --plan-gebaeude: #D8C6C6; --leer: #F7F4F4;
  --schrift: Figtree, "Segoe UI", system-ui, sans-serif; --titel: "Bricolage Grotesque", Figtree, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root {
  --rot: #F08A90; --rot-sanft: #3A1E22; --kopf: #5A1A20; --tief: #3A1014; --kamm: #F0585B;
  --tinte: #F1ECEC; --grau: #B5ABAB; --linie: #3A3132; --grund: #1C1718; --karte: #262021;
  --gruen: #6CC070; --gruen-sanft: #22351F; --ocker: #E7C35A; --ocker-sanft: #3B3219;
  --plan-boden: #232821; --plan-strasse: #3D3737; --plan-gebaeude: #4A3D3E; --leer: #2C2627; color-scheme: dark; } }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; overflow-x: clip; }
body { background: var(--grund); color: var(--tinte); font: 400 15px/1.45 var(--schrift); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }

/* ── Gerüst: Kopf, Hinweisband, Menü links, Inhalt ── */
header.kopf { position: sticky; top: 0; z-index: 40; background: var(--kopf); color: #fff; display: flex; align-items: center; gap: 12px; padding: 10px 18px; }
.plakette { width: 42px; height: 42px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: none; overflow: hidden; }
.plakette img { width: 86%; height: 86%; object-fit: contain; }
.marke { font: 700 18px/1.1 var(--titel); margin-right: auto; white-space: nowrap; }
.marke small { display: block; font: 600 11px var(--schrift); letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.kopf-info { font-size: 13px; opacity: .9; }
.kopf button { border: 1px solid rgba(255,255,255,.5); background: none; color: #fff; border-radius: 999px; padding: 6px 12px; }
.testband { background: var(--ocker-sanft); color: var(--ocker); font-weight: 700; font-size: 13px; padding: 6px 18px; text-align: center; }
.rumpf { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100vh - 100px); }
nav.menue { background: var(--karte); border-right: 1px solid var(--linie); padding: 14px 10px; display: grid; align-content: start; gap: 2px; }
nav.menue button { border: 0; background: none; text-align: left; padding: 10px 12px; border-radius: 12px; color: var(--tinte); font-weight: 600; display: flex; gap: 10px; align-items: center; }
nav.menue button.an { background: var(--rot-sanft); color: var(--rot); }
nav.menue button:hover { background: var(--rot-sanft); }
main { min-width: 0; padding: 20px 24px 40px; }
h1 { font: 800 30px/1.05 var(--titel); letter-spacing: -.03em; margin: 0 0 4px; }
h2 { font: 700 19px var(--titel); margin: 22px 0 10px; }
.unter { color: var(--grau); font-size: 13px; margin: 0 0 16px; }
.klein { font-size: 12.5px; color: var(--grau); }
.hinweis { background: var(--ocker-sanft); color: var(--ocker); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-weight: 600; }
.knopf { border: 0; border-radius: 999px; background: var(--rot); color: #fff; padding: 12px 18px; font-size: 15px; font-weight: 700; }
.knopf.leise { background: var(--karte); color: var(--tinte); border: 1px solid var(--linie); font-weight: 600; }
.eingabe { width: 100%; border: 1px solid var(--linie); border-radius: 12px; padding: 12px 14px; background: var(--karte); font-size: 16px; }

/* ── Anmelden ── */
.anmelden { max-width: 380px; margin: 60px auto; display: grid; gap: 12px; text-align: center; }
.anmelden .zeile { display: flex; align-items: center; gap: 12px; background: var(--karte); border: 1px solid var(--linie); border-radius: 16px; padding: 12px 14px; font-weight: 700; font-size: 17px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font: 800 16px var(--titel); background: var(--rot); }

/* ── Lageplan ── */
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.kachel { background: var(--karte); border: 1px solid var(--linie); border-radius: 18px; padding: 14px 16px; text-align: left; display: grid; gap: 4px; }
.kachel b { font: 700 18px var(--titel); }
.kachel .zahlen { color: var(--grau); font-size: 13px; }
.kachel .notiz { color: var(--ocker); font-size: 12.5px; font-weight: 600; }
.planbereich { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.plan-box { background: var(--plan-boden); border-radius: 18px; overflow: hidden; border: 1px solid var(--linie); }
.plan-box svg { width: 100%; height: auto; display: block; max-height: 72vh; }
.planwerkzeug { display: flex; gap: 8px; margin: 0 0 10px; flex-wrap: wrap; }
.legende { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--grau); margin-top: 8px; }
.legende i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; border: 2px solid; }
.detail { background: var(--karte); border: 1px solid var(--linie); border-radius: 18px; padding: 16px; position: sticky; top: 90px; }
.detail h2 { margin-top: 0; }
.werte { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 14px; margin-bottom: 12px; }
.werte span:nth-child(odd) { color: var(--grau); }
table.buchungen { width: 100%; border-collapse: collapse; font-size: 13px; }
table.buchungen td, table.buchungen th { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--linie); vertical-align: top; }
table.buchungen td.menge { text-align: right; font-weight: 700; white-space: nowrap; }
.plus { color: var(--gruen); } .minus { color: var(--kamm); }
.bald { background: var(--karte); border: 1px dashed var(--linie); border-radius: 18px; padding: 30px; color: var(--grau); text-align: center; }

@media (max-width: 900px) {
  .rumpf { grid-template-columns: minmax(0, 1fr); }
  nav.menue { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--linie); padding: 8px; }
  nav.menue button { white-space: nowrap; }
  .planbereich { grid-template-columns: minmax(0, 1fr); }
  .detail { position: static; }
  main { padding: 16px; }
  .kopf-info { display: none; }
}

/* ── Stufe 2: Bestand, Dialoge, Meldungen ── */
.werkzeug { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.werkzeug .eingabe { width: auto; min-width: 200px; padding: 9px 12px; font-size: 14px; }
table.liste { width: 100%; border-collapse: collapse; background: var(--karte); border: 1px solid var(--linie); border-radius: 14px; overflow: hidden; font-size: 14px; }
table.liste th { text-align: left; font-size: 12px; color: var(--grau); padding: 10px; border-bottom: 1px solid var(--linie); cursor: pointer; white-space: nowrap; }
table.liste td { padding: 9px 10px; border-bottom: 1px solid var(--linie); }
table.liste td.zahl { text-align: right; font-weight: 700; }
table.liste tr:hover td { background: var(--rot-sanft); }
.punkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; border: 2px solid; }
.knopf.klein { padding: 6px 12px; font-size: 13px; }
.aktionen { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 14px; }
.ebene { position: fixed; inset: 0; background: rgba(20,10,12,.45); display: grid; place-items: center; z-index: 100; padding: 16px; }
.dialog { background: var(--karte); border-radius: 20px; padding: 20px; width: min(520px, 100%); max-height: 90vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.dialog h2 { margin: 0 0 12px; }
.dialog label { display: grid; gap: 4px; font-size: 13px; color: var(--grau); margin-bottom: 10px; }
.dialog label .eingabe { color: var(--tinte); }
.dialog .reihe { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dialog .knopfreihe { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.reiter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.reiter button { border: 1px solid var(--linie); background: var(--karte); border-radius: 999px; padding: 7px 12px; font-weight: 600; }
.reiter button.an { background: var(--rot); color: #fff; border-color: var(--rot); }
.sorten { display: flex; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--tinte); }
.meldung { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--tinte); color: var(--karte); padding: 10px 18px; border-radius: 999px; z-index: 200; font-weight: 600; }
.storniert { text-decoration: line-through; opacity: .55; }
.link { border: 0; background: none; color: var(--rot); padding: 0; font-size: 12px; text-decoration: underline; }
@media (max-width: 700px) { .dialog .reihe { grid-template-columns: 1fr; } table.liste .weg { display: none; } }

/* ── Stufe 3: Touren, Route, Fangliste ── */
.tafel { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 14px; align-items: start; }
.spalte-ohne { background: var(--karte); border: 1px solid var(--linie); border-radius: 16px; padding: 10px; position: sticky; top: 90px; max-height: 75vh; overflow: auto; }
.tag { background: var(--karte); border: 1px solid var(--linie); border-radius: 16px; padding: 10px 12px; margin-bottom: 10px; }
.tag.wochenende { opacity: .7; }
.tag h3 { font: 700 15px var(--titel); margin: 0 0 8px; }
.touren { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.tour { border: 1px dashed var(--linie); border-radius: 12px; padding: 8px; min-height: 64px; background: var(--grund); }
.tour.ziel { border-color: var(--rot); background: var(--rot-sanft); }
.tour-kopf { display: flex; justify-content: space-between; gap: 6px; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; }
.tour-kopf button { border: 0; background: none; color: var(--rot); font-weight: 700; padding: 0; font-size: 12.5px; }
.karte-b { background: var(--karte); border: 1px solid var(--linie); border-radius: 10px; padding: 6px 8px; margin-bottom: 6px; cursor: grab; font-size: 13px; }
.karte-b b { display: block; }
.karte-b.geuebt { border-color: var(--ocker); background: var(--ocker-sanft); }
.routekarte { background: var(--plan-boden); border-radius: 14px; border: 1px solid var(--linie); }
.routekarte svg { width: 100%; height: auto; display: block; }
ol.route { padding-left: 22px; } ol.route li { margin-bottom: 6px; }
.fangrahmen { width: 100%; height: 75vh; border: 1px solid var(--linie); border-radius: 14px; background: #fff; }
@media (max-width: 900px) { .tafel { grid-template-columns: minmax(0, 1fr); } .spalte-ohne { position: static; max-height: none; } }
/* Stufe 4: Lieferscheine */
.ls-karte { background: var(--karte); border: 1px solid var(--linie); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.ls-kopf { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.ls-kopf .knopf { margin-left: auto; }
.q { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 8px; padding: 1px 7px; margin-left: 4px; }
.q-fang { background: #C8E6C9; color: #2F7D34; }
.q-geraten { background: #FFE0B2; color: #E65100; }
.q-hand { background: #BBDEFB; color: #1565C0; }
.q-bm { background: var(--linie); color: var(--grau); }
/* Stufe 5: Einstallen, Bescheinigungen */
.dokliste { list-style: none; padding: 0; margin: 0 0 12px; font-size: 14px; }
.dokliste li { padding: 6px 0; border-bottom: 1px solid var(--linie); }
