:root {
    --akzent: #C85A19;
    --akzent-hell: #E8752A;
    --grund: #16181b;
    --flaeche: #1f2226;
    --flaeche-hell: #2a2e33;
    --rand: #33383e;
    --text: #e6e6e6;
    --text-leise: #9aa0a6;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--grund); color: var(--text); font-family: 'Barlow', system-ui, sans-serif; font-size: 14px; }

.kopf {
    height: 56px; display: flex; align-items: center; gap: 24px; padding: 0 16px;
    background: linear-gradient(90deg, #1b1d20, #202327); border-bottom: 2px solid var(--akzent);
}
.marke { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 26px; letter-spacing: 3px; text-transform: uppercase; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.marke em { font-style: normal; color: var(--akzent); }
.marke .punkt { width: 12px; height: 12px; background: var(--akzent); transform: skewX(-15deg); }
.suche { flex: 1; display: flex; gap: 8px; max-width: 640px; }
.suche input { flex: 1; background: var(--grund); border: 1px solid var(--rand); color: var(--text); padding: 8px 12px; font-family: inherit; }
.suche input:focus { outline: none; border-color: var(--akzent); }
.nutzer { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nutzer img { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--akzent); }

.knopf, button {
    background: var(--akzent); color: #fff; border: none; padding: 8px 14px; cursor: pointer;
    font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 15px; letter-spacing: 1px; text-transform: uppercase; text-decoration: none;
    clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
.knopf:hover, button:hover { background: var(--akzent-hell); }
.knopf.leise, button.leise { background: var(--flaeche-hell); color: var(--text); }

.buehne { position: relative; height: calc(100% - 56px); display: flex; }
.seite { width: 300px; background: var(--flaeche); border-right: 1px solid var(--rand); overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.block { background: var(--grund); border: 1px solid var(--rand); border-left: 3px solid var(--akzent); padding: 10px 12px; }
.block h3 { margin: 0 0 8px; font-family: 'Barlow Condensed', sans-serif; font-size: 16px; letter-spacing: 2px; text-transform: uppercase; color: var(--akzent); }
.block label { display: block; padding: 3px 0; cursor: pointer; }
.block.warn { border-left-color: #d64838; }
.hinweis { color: var(--text-leise); margin: 4px 0; }
.liste { display: flex; flex-direction: column; gap: 4px; max-height: 40vh; overflow-y: auto; }
.eintrag { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: var(--flaeche); border: 1px solid var(--rand); cursor: pointer; }
.eintrag:hover { border-color: var(--akzent); }
.eintrag .symbol { font-size: 18px; width: 24px; text-align: center; }
.eintrag .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eintrag .klein { color: var(--text-leise); font-size: 12px; }
.eintrag .weg { color: var(--text-leise); cursor: pointer; padding: 0 4px; }
.eintrag .weg:hover { color: #d64838; }

#karte { flex: 1; background: var(--grund); }
.leaflet-container { background: var(--grund); font-family: inherit; }
.leaflet-control-zoom a { background: var(--flaeche); color: var(--text); border-color: var(--rand); }
.leaflet-control-zoom a:hover { background: var(--akzent); color: #fff; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--flaeche); color: var(--text); }
.leaflet-popup-content-wrapper { border-left: 3px solid var(--akzent); border-radius: 0; }
.leaflet-popup-content b { font-family: 'Barlow Condensed', sans-serif; font-size: 16px; letter-spacing: 1px; text-transform: uppercase; }
.leaflet-popup-content .klein { color: var(--text-leise); font-size: 12px; }
.leaflet-popup-content code { background: var(--grund); padding: 2px 4px; }

.sektor-label { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 34px; color: rgba(255,255,255,.75); text-shadow: 0 0 6px #000; text-align: center; line-height: 40px; pointer-events: none; }
.tasten-label { font-family: 'Barlow Condensed', sans-serif; font-size: 12px; color: rgba(255,255,255,.55); text-shadow: 0 0 3px #000; pointer-events: none; }
.marker-symbol { font-size: 22px; line-height: 1; text-shadow: 0 0 4px #000, 0 0 6px #000; }
.marker-symbol.fremd { opacity: .85; }
.fahrzeug-symbol { font-size: 20px; line-height: 1; filter: drop-shadow(0 0 3px #000); }
.fahrzeug-symbol.fremd { opacity: .6; filter: grayscale(.6) drop-shadow(0 0 3px #000); }

.koordinaten {
    position: absolute; right: 12px; bottom: 12px; z-index: 800; display: flex; align-items: center; gap: 12px;
    background: rgba(31,34,38,.92); border: 1px solid var(--rand); border-left: 3px solid var(--akzent); padding: 8px 12px; font-family: monospace;
}
.koordinaten .sektor { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 20px; letter-spacing: 2px; color: var(--akzent); min-width: 60px; }
.koordinaten button { padding: 4px 10px; font-size: 13px; }

.dialog { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 2000; align-items: center; justify-content: center; }
.dialog.offen { display: flex; }
.dialog-inhalt { width: 360px; background: var(--flaeche); border: 1px solid var(--rand); border-top: 3px solid var(--akzent); padding: 16px; }
.dialog-inhalt h3 { margin: 0 0 8px; font-family: 'Barlow Condensed', sans-serif; letter-spacing: 2px; text-transform: uppercase; color: var(--akzent); }
.dialog-inhalt label { display: block; margin: 10px 0 4px; color: var(--text-leise); }
.dialog-inhalt label.zeile { display: flex; align-items: center; gap: 8px; color: var(--text); }
.dialog-inhalt select, .dialog-inhalt input[type=text] { width: 100%; background: var(--grund); border: 1px solid var(--rand); color: var(--text); padding: 8px; font-family: inherit; }
.dialog-inhalt .sektor { font-family: monospace; color: var(--text-leise); }
.knoepfe { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

@media (max-width: 800px) {
    .seite { display: none; }
    .suche { max-width: none; }
}

.knopf.breit { display: block; width: 100%; text-align: center; margin-bottom: 8px; }
button.klein { padding: 3px 8px; font-size: 12px; }
.kat-knoepfe { display: flex; gap: 6px; margin-bottom: 6px; }
.zaehler { color: var(--text-leise); font-size: 12px; letter-spacing: 0; text-transform: none; margin-left: 6px; }
.kat-gruppe { margin-top: 6px; }
.kat-gruppe h4 { margin: 4px 0; font-family: 'Barlow Condensed', sans-serif; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--text-leise); cursor: pointer; display: flex; justify-content: space-between; }
.kat-gruppe h4 .an { color: var(--akzent); }
.kat-gruppe label { display: flex; align-items: center; gap: 6px; padding: 2px 0; }
.kat-gruppe label .symbol { width: 20px; text-align: center; }
.kat-gruppe label .anzahl { margin-left: auto; color: var(--text-leise); font-size: 12px; }
#marker-suche { width: 100%; background: var(--flaeche); border: 1px solid var(--rand); color: var(--text); padding: 6px 8px; margin-bottom: 6px; font-family: inherit; }
body.setzen #karte { cursor: crosshair; }
.hinweis-band { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 900; background: var(--akzent); color: #fff; padding: 8px 16px; font-family: 'Barlow Condensed', sans-serif; font-size: 16px; letter-spacing: 1px; text-transform: uppercase; display: none; }
body.setzen .hinweis-band { display: block; }

/* Scrollbalken im Seitendesign */
* { scrollbar-width: thin; scrollbar-color: var(--akzent) var(--grund); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--grund); }
::-webkit-scrollbar-thumb { background: var(--flaeche-hell); border: 1px solid var(--grund); }
::-webkit-scrollbar-thumb:hover { background: var(--akzent); }
::-webkit-scrollbar-corner { background: var(--grund); }

/* Ladeanzeige */
.laden { position: absolute; top: 0; left: 300px; right: 0; z-index: 900; display: none; align-items: center; gap: 8px; padding: 6px 12px; font-family: 'Barlow Condensed', sans-serif; font-size: 14px; letter-spacing: 2px; text-transform: uppercase; color: var(--akzent); pointer-events: none; }
.laden.aktiv { display: flex; }
.laden::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--akzent), transparent); background-size: 200% 100%; animation: ladebalken 1.2s linear infinite; }
.laden span { width: 10px; height: 10px; border: 2px solid var(--akzent); border-top-color: transparent; border-radius: 50%; animation: drehen .8s linear infinite; }
@keyframes ladebalken { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes drehen { to { transform: rotate(360deg); } }
@media (max-width: 800px) { .laden { left: 0; } }
