/* ELW-Web – Oberfläche (Dunkel/Hell) */
:root, [data-theme="dark"] {
  --bg: #12151a; --bg2: #181c22; --panel: #1d2128; --panel2: #232831; --line: #2e3540; --line2: #3a424e;
  --text: #e9ecef; --muted: #9aa4b1; --faint: #6b7584;
  --red: #d0182f; --red2: #ff4d5e; --yellow: #ffcc00; --green: #2fb36d; --blue: #3d8bfd; --orange: #ff8a1f; --purple: #a46cf5;
  --focus: #ffcc00; --shadow: 0 8px 30px rgba(0,0,0,.45); --radius: 8px;
  --input: #11141a; --hover: rgba(255,255,255,.05); --sel: rgba(61,139,253,.18);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #eef0f3; --bg2: #e6e9ee; --panel: #ffffff; --panel2: #f6f7f9; --line: #d9dde3; --line2: #c5cbd3;
  --text: #1b1f24; --muted: #5c6672; --faint: #8a939e; --input: #fff; --hover: rgba(0,0,0,.04); --sel: rgba(61,139,253,.14);
  --shadow: 0 8px 30px rgba(0,0,0,.15); color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; }
h2 { font-size: 18px; } h3 { font-size: 15px; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12px; } .nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.right { text-align: right; } .center { text-align: center; }
.grow { flex: 1; min-width: 0; } .hide { display: none !important; }
.row { display: flex; gap: 8px; align-items: center; } .row.wrap { flex-wrap: wrap; } .col { display: flex; flex-direction: column; gap: 8px; }
.gap12 { gap: 12px; } .mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mb8 { margin-bottom: 8px; } .p12 { padding: 12px; } .p16 { padding: 16px; }

/* Boot & Login */
.boot { height: 100vh; display: grid; place-content: center; text-align: center; color: var(--muted); gap: 8px; }
.boot-logo, .logo { font-weight: 800; font-size: 28px; letter-spacing: .5px; color: var(--text); }
.boot-logo span, .logo span { color: var(--red); }
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 600px at 20% 0%, rgba(208,24,47,.18), transparent), var(--bg); }
.login-card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px; box-shadow: var(--shadow); }
.login-card .logo { font-size: 34px; margin-bottom: 2px; }

/* Layout */
.app { display: flex; flex-direction: column; height: 100vh; }
.topbar { height: 50px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 10px; background: var(--bg2); border-bottom: 1px solid var(--line); position: relative; z-index: 1100; }
.topbar .logo { font-size: 19px; margin-right: 6px; cursor: pointer; white-space: nowrap; }
.nav { display: flex; gap: 2px; align-items: center; }
.nav > a, .nav > .dd > a { display: flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 6px; color: var(--muted); text-decoration: none; font-weight: 550; white-space: nowrap; cursor: pointer; }
.nav > a:hover, .nav > .dd > a:hover { background: var(--hover); color: var(--text); }
.nav a.active { color: var(--text); background: var(--panel2); }
.dd { position: relative; }
.dd-menu { position: absolute; top: calc(100% + 4px); left: 0; min-width: 210px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 5px; display: none; z-index: 1200; }
.dd.open .dd-menu { display: block; }
.dd-menu a { display: block; padding: 7px 10px; border-radius: 5px; color: var(--text); text-decoration: none; cursor: pointer; }
.dd-menu a:hover { background: var(--hover); }
.dd-menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 0; }
.dd-right .dd-menu { left: auto; right: 0; }
.clock { font: 600 17px ui-monospace, Menlo, Consolas, monospace; padding: 0 10px; letter-spacing: .5px; }
.mandant-name { color: var(--muted); font-size: 13px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alarm-badge { background: var(--red); color: #fff; border-radius: 10px; padding: 1px 7px; font-size: 12px; font-weight: 700; }
.main { flex: 1; min-height: 0; overflow: auto; position: relative; }
.page { padding: 16px; max-width: 1500px; margin: 0 auto; }
.page-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.page-head h2 { margin-right: auto; }
.burger { display: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 13px; border-radius: 7px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); cursor: pointer; font-weight: 550; white-space: nowrap; text-decoration: none; line-height: 1.25; user-select: none; }
.btn:hover { border-color: var(--muted); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { filter: brightness(1.12); }
.btn.ok { background: var(--green); border-color: var(--green); color: #fff; }
.btn.warn { background: var(--yellow); border-color: var(--yellow); color: #111; }
.btn.danger { color: var(--red2); border-color: rgba(255,77,94,.45); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.sm { padding: 4px 9px; font-size: 13px; border-radius: 6px; }
.btn.xs { padding: 1px 6px; font-size: 12px; border-radius: 5px; }
.btn.lg { padding: 11px 18px; font-size: 16px; }
.btn.icon { padding: 6px 8px; }
.btn-group { display: inline-flex; } .btn-group .btn { border-radius: 0; } .btn-group .btn:first-child { border-radius: 7px 0 0 7px; } .btn-group .btn:last-child { border-radius: 0 7px 7px 0; } .btn-group .btn + .btn { margin-left: -1px; }

/* Forms */
.input, input[type=text], input[type=password], input[type=number], input[type=email], input[type=search], input[type=datetime-local], input[type=date], input[type=time], input[type=url], input[type=tel], select, textarea {
  width: 100%; padding: 7px 9px; border: 1px solid var(--line2); background: var(--input); border-radius: 6px; outline: none; min-height: 34px; }
textarea { resize: vertical; min-height: 64px; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); box-shadow: 0 0 0 2px rgba(255,204,0,.18); }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--red); vertical-align: middle; }
input[type=color] { width: 46px; height: 34px; padding: 2px; border: 1px solid var(--line2); border-radius: 6px; background: var(--input); }
label.lbl { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 3px; }
.form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; }
.form .f { grid-column: span 2; min-width: 0; }
.form .w1 { grid-column: span 1; } .form .w3 { grid-column: span 3; } .form .w4 { grid-column: span 4; }
.form .help { font-size: 12px; color: var(--faint); margin-top: 3px; }
.form .chk { display: flex; align-items: center; gap: 8px; min-height: 34px; padding-top: 16px; }
.form h4 { grid-column: span 4; font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-top: 6px; }
.req::after { content: ' *'; color: var(--red2); }
.search { max-width: 280px; }

/* Cards / Panels */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.card-h { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.card-h h3 { margin-right: auto; }
.card-b { padding: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 4px 12px; }
.kv > div:nth-child(odd) { color: var(--muted); }
.kv > div { min-width: 0; overflow-wrap: anywhere; }
.badge { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 12px; font-weight: 650; background: var(--panel2); border: 1px solid var(--line2); white-space: nowrap; }
.badge.red { background: rgba(208,24,47,.2); border-color: rgba(255,77,94,.5); color: #ff8b97; }
.badge.green { background: rgba(47,179,109,.18); border-color: rgba(47,179,109,.5); color: #6fdca0; }
.badge.yellow { background: rgba(255,204,0,.18); border-color: rgba(255,204,0,.5); color: #ffd84d; }
.badge.blue { background: rgba(61,139,253,.18); border-color: rgba(61,139,253,.5); color: #8bb8ff; }
[data-theme="light"] .badge.red { color: #b0101f; } [data-theme="light"] .badge.green { color: #16784a; } [data-theme="light"] .badge.yellow { color: #8a6c00; } [data-theme="light"] .badge.blue { color: #1d5bd0; }
.empty { padding: 30px; text-align: center; color: var(--faint); }
.note { padding: 10px 12px; border-radius: 7px; background: var(--panel2); border: 1px solid var(--line); font-size: 13px; }
.note.warn { border-color: rgba(255,204,0,.5); background: rgba(255,204,0,.08); }
.note.err { border-color: rgba(255,77,94,.5); background: rgba(208,24,47,.1); }
.note.ok { border-color: rgba(47,179,109,.5); background: rgba(47,179,109,.08); }
code, .code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; background: var(--input); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; overflow-wrap: anywhere; }
pre.code { padding: 8px; white-space: pre-wrap; max-height: 260px; overflow: auto; }

/* Tabellen */
.tbl-wrap { overflow: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 650; padding: 8px 10px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 1; white-space: nowrap; }
.tbl td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--hover); }
.tbl tr.sel td { background: var(--sel); }
.tbl td.act { white-space: nowrap; text-align: right; width: 1%; }
.tbl.dense td { padding: 4px 8px; }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 3000; display: grid; place-items: center; padding: 16px; animation: fade .12s; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; width: 100%; max-width: 640px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow); }
.modal.wide { max-width: 980px; } .modal.xwide { max-width: 1280px; }
.modal-h { display: flex; align-items: center; padding: 13px 16px; border-bottom: 1px solid var(--line); gap: 8px; }
.modal-h h3 { margin-right: auto; font-size: 16px; }
.modal-b { padding: 16px; overflow: auto; }
.modal-f { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }

/* Toast */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 4000; display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.toast { padding: 11px 14px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--green); box-shadow: var(--shadow); animation: fade .15s; }
.toast.err { border-left-color: var(--red2); } .toast.warn { border-left-color: var(--yellow); }

/* Tabs */
.tabs { display: flex; gap: 2px; padding: 0 10px; border-bottom: 1px solid var(--line); background: var(--bg2); overflow-x: auto; flex: none; }
.tabs a { padding: 10px 13px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; cursor: pointer; font-weight: 550; display: flex; gap: 6px; align-items: center; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); border-bottom-color: var(--red); }
.tabs .cnt { font-size: 11px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 9px; padding: 0 6px; color: var(--muted); }

/* Einsatzliste */
.einsatz-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.ecard { background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--red); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; transition: transform .08s, border-color .08s; }
.ecard:hover { transform: translateY(-1px); border-color: var(--line2); }
.ecard .sw { font-size: 21px; font-weight: 800; line-height: 1.15; }
.ecard .swt { color: var(--muted); font-weight: 550; }
.ecard .adr { margin-top: 6px; font-weight: 600; }
.ecard .meta { display: flex; gap: 12px; margin-top: 8px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.ecard .timer { font-family: ui-monospace, Menlo, monospace; font-weight: 700; color: var(--text); }
.kat-Brand { --kc: #e3172f; } .kat-Technische { --kc: #3d8bfd; } .kat-Gefahrstoff { --kc: #ff8a1f; } .kat-Rettungsdienst { --kc: #f2f2f2; } .kat-Unwetter { --kc: #a46cf5; } .kat-Sonstiges { --kc: #8a939e; }
.ecard[class*="kat-"] { border-left-color: var(--kc); }
.kat-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--kc, #888); margin-right: 6px; }
.stat-bars { display: flex; flex-direction: column; gap: 6px; }
.stat-bar { display: grid; grid-template-columns: 140px 1fr 40px; align-items: center; gap: 8px; font-size: 13px; }
.stat-bar .b { height: 10px; border-radius: 5px; background: var(--kc, var(--blue)); }
.months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; align-items: end; height: 90px; }
.months div { background: var(--blue); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
.months span { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font-size: 10px; color: var(--faint); }

/* Einsatzansicht */
.ev { display: flex; flex-direction: column; height: 100%; }
.ev-head { flex: none; display: flex; align-items: center; gap: 14px; padding: 9px 14px; background: var(--panel); border-bottom: 1px solid var(--line); border-left: 8px solid var(--kc, var(--red)); flex-wrap: wrap; }
.ev-head .sw { font-size: 24px; font-weight: 850; line-height: 1.05; }
.ev-head .swt { color: var(--muted); font-weight: 600; font-size: 13px; }
.ev-head .adr { font-weight: 650; font-size: 15px; }
.ev-head .times { font-family: ui-monospace, Menlo, monospace; text-align: right; }
.ev-head .times .big { font-size: 22px; font-weight: 800; }
.ev-body { flex: 1; min-height: 0; overflow: auto; position: relative; }
.ev-split { display: grid; grid-template-columns: minmax(0, 1fr) 430px; height: 100%; }
.ev-split > .side { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--bg2); }
.ev-split > .side .sec { border-bottom: 1px solid var(--line); }
.ev-split > .side .scroll { flex: 1; overflow: auto; min-height: 0; }
.ev-pad { padding: 14px; }
.uebung { background: repeating-linear-gradient(45deg, rgba(255,204,0,.15) 0 10px, transparent 10px 20px); }

/* ETB */
.etb-form { display: grid; grid-template-columns: 92px 150px 1fr 1fr; gap: 6px; padding: 10px; }
.etb-form textarea { grid-column: 1 / -1; min-height: 54px; }
.etb-form .foot { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.etb-list .e { padding: 7px 10px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 58px 1fr; gap: 8px; }
.etb-list .e .t { font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: var(--muted); }
.etb-list .e .k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--faint); }
.etb-list .e.wichtig { border-left: 3px solid var(--yellow); background: rgba(255,204,0,.05); }
.etb-list .e.storno .txt { text-decoration: line-through; color: var(--faint); }
.etb-list .e.sys .txt { color: var(--muted); }
.etb-list .txt { white-space: pre-wrap; overflow-wrap: anywhere; }
.etb-tbl td.txt { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 260px; }
.etb-tbl tr.storno td { text-decoration: line-through; color: var(--faint); }
.etb-tbl tr.wichtig td:first-child { box-shadow: inset 3px 0 0 var(--yellow); }

/* FMS */
.fms { display: inline-flex; gap: 2px; flex-wrap: nowrap; }
.fms b { width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: 5px; font-size: 13px; background: var(--panel2); border: 1px solid var(--line2); cursor: pointer; color: var(--muted); font-weight: 700; }
.fms b:hover { border-color: var(--text); color: var(--text); }
.fms b.on { color: #111; border-color: transparent; }
.fms-1, .fms-2 { --fc: #2fb36d; } .fms-3 { --fc: #ffcc00; } .fms-4 { --fc: #ff4d5e; } .fms-5, .fms-0 { --fc: #3d8bfd; } .fms-6 { --fc: #8a939e; } .fms-7, .fms-8 { --fc: #a46cf5; } .fms-9 { --fc: #ff8a1f; }
.fms b.on { background: var(--fc); }
.fms-pill { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 5px; font-weight: 800; font-size: 13px; color: #111; background: var(--fc, #888); }
.kraft-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 6px 10px; border-bottom: 1px solid var(--line); align-items: center; }
.kraft-row .n { font-weight: 650; }
.staerke { font-family: ui-monospace, Menlo, monospace; }

/* Atemschutz */
.as-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.as-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; border-top: 5px solid var(--green); }
.as-card.faellig { border-top-color: var(--yellow); animation: blink 1s infinite; }
.as-card.kritisch, .as-card.notfall { border-top-color: var(--red2); }
.as-card.notfall { background: rgba(208,24,47,.25); animation: blink .6s infinite; }
.as-card.beendet { opacity: .6; border-top-color: var(--faint); }
.as-card .timer { font: 800 34px ui-monospace, Menlo, monospace; }
@keyframes blink { 50% { box-shadow: 0 0 0 3px rgba(255,204,0,.6); } }

/* Karte */
.map { position: absolute; inset: 0; background: #1a1d22; }
.map-wrap { position: relative; height: 100%; min-height: 300px; }
.map-tools { position: absolute; top: 10px; left: 10px; z-index: 900; display: flex; flex-direction: column; gap: 4px; }
.map-tools .btn { width: 40px; height: 40px; padding: 0; font-size: 17px; background: var(--panel); box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.map-tools .btn.on { background: var(--yellow); color: #111; border-color: var(--yellow); }
.map-tools .sep { height: 6px; }
.leaflet-left .leaflet-control-zoom { margin-left: 60px !important; }
.map-hint { position: absolute; left: 50%; transform: translateX(-50%); top: 10px; z-index: 900; background: rgba(0,0,0,.78); color: #fff; padding: 7px 12px; border-radius: 6px; font-size: 13px; pointer-events: auto; display: flex; gap: 8px; align-items: center; }
.map-hint .btn { color: #fff; }
.palette { position: absolute; top: 10px; left: 60px; bottom: 10px; width: 320px; z-index: 950; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.palette .ph { padding: 8px 10px; border-bottom: 1px solid var(--line); display: flex; gap: 6px; align-items: center; }
.palette .pb { overflow: auto; padding: 8px 10px; flex: 1; }
.palette .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 10px 0 5px; font-weight: 700; }
.palette .items { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.palette .it { border: 1px solid var(--line); border-radius: 6px; padding: 4px 2px 3px; text-align: center; cursor: pointer; font-size: 10.5px; line-height: 1.15; color: var(--muted); background: var(--panel2); }
.palette .it:hover { border-color: var(--muted); color: var(--text); }
.palette .it.on { border-color: var(--yellow); background: rgba(255,204,0,.12); color: var(--text); }
.palette .it svg, .palette .it img { width: 46px; height: 38px; display: block; margin: 0 auto 2px; object-fit: contain; }
.tz-icon { background: none !important; border: none !important; }
.tz { display: flex; flex-direction: column; align-items: center; pointer-events: auto; }
.tz svg, .tz img { filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.tz .lbl { margin-top: 1px; background: rgba(255,255,255,.92); color: #000; font: 700 11px/1.2 system-ui, sans-serif; padding: 1px 4px; border-radius: 3px; white-space: nowrap; box-shadow: 0 1px 2px rgba(0,0,0,.4); }
.tz.sel svg, .tz.sel img { outline: 2px dashed var(--yellow); outline-offset: 2px; }
.tz.stale { opacity: .45; }
.map-text { font: 700 14px/1.2 system-ui, sans-serif; color: #000; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; white-space: nowrap; }
.vtx-icon { width: 12px !important; height: 12px !important; margin: -6px 0 0 -6px !important; background: #fff; border: 2px solid #000; border-radius: 50%; cursor: move; }
.hyd-icon { background: none; border: none; }
.hyd { width: 18px; height: 18px; border-radius: 50%; background: #1565c0; color: #fff; font: 800 11px/18px system-ui; text-align: center; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.hyd.ofh { background: #d32f2f; } .hyd.lw { background: #00838f; border-radius: 3px; }
.obj-pin { background: none; border: none; }
.obj-pin div { width: 24px; height: 24px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #6d4c41; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.6); }
.obj-pin span { position: absolute; left: 6px; top: 3px; color: #fff; font: 800 11px system-ui; }
.einsatz-pin { background: none; border: none; }
.einsatz-pin .p { width: 34px; height: 34px; border-radius: 50%; background: var(--kc, var(--red)); border: 3px solid #fff; box-shadow: 0 0 0 3px rgba(208,24,47,.5), 0 2px 8px rgba(0,0,0,.6); animation: pulse 1.6s infinite; display: grid; place-items: center; color: #fff; font: 900 14px system-ui; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(208,24,47,0), 0 2px 8px rgba(0,0,0,.6); } }
.map-search { position: absolute; top: 10px; right: 54px; z-index: 900; width: 300px; }
.map-search .res { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; margin-top: 4px; box-shadow: var(--shadow); max-height: 300px; overflow: auto; }
.map-search .res div { padding: 6px 10px; cursor: pointer; font-size: 13px; border-bottom: 1px solid var(--line); }
.map-search .res div:hover { background: var(--hover); }
.leaflet-popup-content { margin: 10px 12px; min-width: 200px; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel); color: var(--text); }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.leaflet-container { font: inherit; }
.pop-form { display: flex; flex-direction: column; gap: 6px; }
.pop-form .row { gap: 6px; }
.map-missing { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: var(--muted); padding: 20px; gap: 6px; }
.measure-lbl { background: rgba(0,0,0,.8); color: #fff; padding: 2px 6px; border-radius: 4px; font: 700 12px system-ui; white-space: nowrap; border: none; }

/* Alarm-Overlay */
.alarm-ov { position: fixed; inset: 0; z-index: 5000; background: rgba(120,0,12,.92); color: #fff; display: grid; place-items: center; padding: 20px; animation: alarmflash 1s infinite; }
@keyframes alarmflash { 50% { background: rgba(60,0,6,.94); } }
.alarm-box { max-width: 900px; width: 100%; text-align: center; }
.alarm-box .sw { font-size: clamp(40px, 9vw, 92px); font-weight: 900; line-height: 1; }
.alarm-box .swt { font-size: clamp(18px, 3vw, 30px); font-weight: 700; margin-top: 6px; }
.alarm-box .adr { font-size: clamp(20px, 4vw, 40px); font-weight: 800; margin: 18px 0; }
.alarm-box .msg { font-size: 18px; opacity: .9; white-space: pre-wrap; }
.alarm-box .btn { font-size: 18px; padding: 12px 24px; }

/* Datei-Liste */
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.file { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel2); display: flex; flex-direction: column; }
.file .thumb { height: 110px; display: grid; place-items: center; background: var(--input); font-size: 34px; color: var(--muted); overflow: hidden; }
.file .thumb img { width: 100%; height: 100%; object-fit: cover; }
.file .fn { padding: 6px 8px; font-size: 12px; overflow-wrap: anywhere; flex: 1; }
.file .fa { display: flex; gap: 4px; padding: 0 6px 6px; }
.drop { border: 2px dashed var(--line2); border-radius: 8px; padding: 14px; text-align: center; color: var(--muted); }
.drop.over { border-color: var(--yellow); color: var(--text); }

/* Responsive */
@media (max-width: 1100px) {
  .ev-split { grid-template-columns: 1fr; grid-template-rows: 55vh auto; height: auto; }
  .ev-split > .side { border-left: 0; border-top: 1px solid var(--line); }
  .grid3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .nav { display: none; position: absolute; top: 50px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--bg2); border-bottom: 1px solid var(--line); padding: 6px; }
  .nav.open { display: flex; }
  .nav .dd-menu { position: static; display: block; box-shadow: none; border: 0; padding-left: 14px; }
  .burger { display: inline-flex; }
  .mandant-name { display: none; }
  .form { grid-template-columns: 1fr 1fr; } .form .f, .form .w3, .form .w4 { grid-column: span 2; } .form .w1 { grid-column: span 1; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .etb-form { grid-template-columns: 1fr 1fr; }
  .kv { grid-template-columns: 110px 1fr; }
  .palette { width: calc(100% - 70px); }
  .ev-head .sw { font-size: 19px; }
  .page { padding: 10px; }
}

/* Druck */
@media print {
  .topbar, .tabs, .map-tools, .no-print, .leaflet-control-container, .palette, .side { display: none !important; }
  .app, .main, .ev, .ev-body { height: auto !important; overflow: visible !important; }
  .ev-split { display: block; height: auto; }
  .map-wrap { height: 92vh !important; }
  body { background: #fff; color: #000; }
}
