:root {
  --bg: #0d1420; --panel: #131c2b; --card: #1a2538; --line: #26344d; --text: #dbe5f5; --mute: #8496b3;
  --accent: #4da3ff; --good: #4cd694; --bad: #ff6b6b; --warn: #ffb84d;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.4 system-ui, "Segoe UI", sans-serif; }
#app { display: flex; flex-direction: column; height: 100%; }
#top { display: flex; align-items: center; gap: 18px; padding: 8px 14px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 16px; color: var(--accent); }
.kpi { font-variant-numeric: tabular-nums; }
.kpi small { display: block; color: var(--mute); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.spacer { flex: 1; }
#speed button { margin-left: 4px; }
main { flex: 1; display: flex; min-height: 0; }
#mapwrap { flex: 1; position: relative; min-width: 0; }
#map { width: 100%; height: 100%; display: block; }
#maptip { position: absolute; pointer-events: none; background: #000c; border: 1px solid var(--line); padding: 4px 8px; border-radius: 6px; font-size: 12px; display: none; white-space: nowrap; }
#side { width: 470px; max-width: 48vw; background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
#tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
#tabs button { flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--mute); padding: 9px 4px; cursor: pointer; font: inherit; }
#tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
#panel { overflow-y: auto; padding: 12px; flex: 1; }
button, select, input { font: inherit; color: var(--text); }
button.btn, #speed button { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; cursor: pointer; }
button.btn:hover, #speed button:hover { border-color: var(--accent); }
button.btn.pri, #speed button.on { background: var(--accent); color: var(--on-accent, #05101f); border-color: var(--accent); font-weight: 600; }
button.btn.dng { border-color: #5a2a2a; color: var(--bad); }
button:disabled { opacity: .4; cursor: not-allowed; }
select, input[type=number], input[type=time] { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; }
input[type=number] { width: 64px; }
h3 { margin: 16px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); }
h3:first-child { margin-top: 0; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.card b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.card small, .mute { color: var(--mute); }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 8px; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th { text-align: left; color: var(--mute); font-weight: 500; font-size: 12px; padding: 3px 4px; }
td { padding: 4px; border-top: 1px solid var(--line); vertical-align: middle; }
.r { text-align: right; }
.good { color: var(--good); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.row label { color: var(--mute); min-width: 74px; }
.log div { padding: 3px 0; border-top: 1px solid var(--line); font-size: 13px; }
.chip { display: inline-block; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 2px 10px; margin: 2px; cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); }
.hours { display: flex; gap: 2px; align-items: flex-end; height: 60px; }
.hours div { flex: 1; background: var(--line); position: relative; min-height: 2px; }
.hours div i { position: absolute; bottom: 0; left: 0; right: 0; background: var(--accent); }
.hours div.ban { background: #3a2230; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.obj { display: flex; justify-content: space-between; padding: 3px 0; border-top: 1px solid var(--line); }
#overlay { position: fixed; inset: 0; background: #060b13ee; display: flex; align-items: center; justify-content: center; z-index: 10; padding: 16px; overflow: auto; }
#overlay.hidden { display: none; }
#overlay .dlg { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 22px; max-width: 560px; width: 100%; }
#overlay h1 { margin: 0 0 4px; color: var(--accent); }
.help { font-size: 12px; color: var(--mute); margin-top: 4px; }
@media (max-width: 800px) {
  main { flex-direction: column; }
  #side { width: 100%; max-width: none; height: 55%; border-left: 0; border-top: 1px solid var(--line); }
}

#mapctl { position: absolute; left: 12px; bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
#mapctl .btn { width: 34px; height: 34px; font-size: 18px; padding: 0; }
#map { cursor: grab; }
tr[data-act] { cursor: pointer; }
#map:active { cursor: grabbing; }
input[type=text] { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; color: var(--text); max-width: 100%; }
input[type=text]::placeholder { color: var(--mute); }
#panel { overflow-x: hidden; }

.brand { display: flex; align-items: center; gap: 8px; }
#who { display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 1.15; }
#who small { display: block; color: var(--mute); font-size: 11px; }
#overlay .dlg.wide { max-width: 860px; }
.steps { display: flex; gap: 6px; flex-wrap: wrap; }
.stp { padding: 2px 10px; border-radius: 12px; border: 1px solid var(--line); color: var(--mute); font-size: 12px; }
.stp.on { border-color: var(--accent); color: var(--text); }
.idgrid { display: grid; grid-template-columns: 190px 1fr; gap: 18px; align-items: start; }
.idprev { display: flex; flex-direction: column; align-items: center; gap: 6px; position: sticky; top: 0; }
.idname { font-weight: 700; text-align: center; }
.idform .row { align-items: flex-start; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.chip2 { background: var(--card); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 3px 9px; cursor: pointer; font: inherit; display: inline-flex; align-items: center; gap: 3px; }
.chip2.big { padding: 2px; }
.chip2:hover { border-color: var(--accent); }
.chip2.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: #1b2b44; }
.sw { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 1px solid #fff4; vertical-align: middle; }
.chips > .sw { width: 24px; height: 24px; cursor: pointer; }
.chips > .sw.sel { outline: 2px solid var(--accent); outline-offset: 1px; }
input[type=color] { width: 36px; height: 26px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--card); cursor: pointer; }
@media (max-width: 700px) { .idgrid { grid-template-columns: 1fr; } .idprev { position: static; } }

/* 3D-Flugzeugbetrachter */
.v3d { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; background: radial-gradient(ellipse at 50% 30%, #243a63 0%, #121b33 55%, #080d1b 100%); }
.v3d-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; font-size: 16px; }
.v3d-stage { flex: 1; min-height: 0; position: relative; }
.v3d-stage canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.v3d-stage canvas:active { cursor: grabbing; }
.v3d-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 10px 16px; background: #0b1226cc; border-top: 1px solid var(--line); }
.v3d-grp { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.v3d-info { margin-left: auto; font-size: 12px; }

/* Kabinen-Konfigurator */
.cabm { position: fixed; inset: 0; z-index: 40; background: #050a16e8; display: flex; align-items: center; justify-content: center; padding: 14px; }
.cabm-card { background: #101a33; border: 1px solid #ffffff2a; border-radius: 14px; padding: 18px; width: min(880px, 96vw); max-height: 94vh; overflow: auto; }
.cabm-card h2 { margin: 0 0 4px; font-size: 18px; color: #ffd6a8; }
.cab-legend span { display: inline-flex; align-items: center; gap: 5px; margin-right: 14px; font-size: 12px; color: var(--mute); }
.cab-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.cab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 10px; }
@media (max-width: 700px) { .cab-grid { grid-template-columns: 1fr; } }
input[type=range].cabr { width: 100%; }
