/* FliegRes – Layout und Farben wie rstcal */
:root {
  --bg: #f6f7f9; --panel: #ffffff; --text: #1b1f24; --muted: #5f6b7a; --line: #e3e6ea;
  --primary: #2f6496; --primary-ink: #ffffff; --danger: #cf222e; --ok: #1a7f37; --warn: #9a6700;
  --radius: 10px; --shadow: 0 8px 30px rgba(15, 23, 42, .12);
  --input-bg: #ffffff; --hover: #f0f2f5; --subtle: #fafbfc; --chip: #eef0f3;
  --sat-bg: #fffbea; --sun-bg: #f1f5fa; --today-bg: #edf2f8; --sel-bg: rgba(47, 100, 150, .12);
  --wait-bg: #fff8e6; --wait-line: #d4a72c; --block-bg: #fde8e8;
  --side-w: 240px; --top-h: 56px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0d1117; --panel: #161b22; --text: #e6edf3; --muted: #8d96a0; --line: #30363d;
  --primary: #5b8dbf; --danger: #f85149; --ok: #3fb950; --warn: #d29922;
  --input-bg: #0d1117; --hover: #21262d; --subtle: #1c2128; --chip: #21262d;
  --sat-bg: rgba(210, 153, 34, .07); --sun-bg: rgba(91, 141, 191, .07); --today-bg: rgba(91, 141, 191, .14); --sel-bg: rgba(91, 141, 191, .22);
  --wait-bg: rgba(210, 153, 34, .14); --wait-line: #d29922; --block-bg: rgba(248, 81, 73, .16);
  --shadow: 0 8px 30px rgba(0, 0, 0, .5);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1117; --panel: #161b22; --text: #e6edf3; --muted: #8d96a0; --line: #30363d;
    --primary: #5b8dbf; --danger: #f85149; --ok: #3fb950; --warn: #d29922;
    --input-bg: #0d1117; --hover: #21262d; --subtle: #1c2128; --chip: #21262d;
    --sat-bg: rgba(210, 153, 34, .07); --sun-bg: rgba(91, 141, 191, .07); --today-bg: rgba(91, 141, 191, .14); --sel-bg: rgba(91, 141, 191, .22);
    --wait-bg: rgba(210, 153, 34, .14); --wait-line: #d29922; --block-bg: rgba(248, 81, 73, .16);
    --shadow: 0 8px 30px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--text); background: var(--bg); -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
a { color: var(--primary); }
button, input, select, textarea { font: inherit; color: inherit; }
h1 { font-size: 20px; margin: 0; }
h2 { font-size: 17px; }

.loading { position: fixed; inset: 0; display: grid; place-items: center; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Buttons & Formulare ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); cursor: pointer; text-decoration: none; color: var(--text); white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { filter: brightness(.9); }
.btn-danger { color: var(--danger); border-color: #f1c0c4; }
.btn-danger:hover { background: rgba(207,34,46,.08); }
.btn-warn { color: var(--warn); border-color: var(--wait-line); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-small { min-height: 30px; padding: 0 10px; font-size: 13px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; color: var(--muted); font-size: 18px; }
.icon-btn:hover { background: var(--chip); color: var(--text); }

input:not([type=checkbox]):not([type=radio]):not([type=color]), select, textarea { width: 100%; min-height: 38px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--input-bg); }
textarea { resize: vertical; min-height: 70px; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(31, 111, 235, .35); outline-offset: 0; border-color: var(--primary); }
input[type=color] { width: 42px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--input-bg); cursor: pointer; }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; accent-color: var(--primary); margin: 0; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; min-width: 0; }
.field > span:first-child { font-weight: 600; font-size: 13px; color: var(--muted); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; margin-bottom: 12px; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.row4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
/* iPad/Safari: Datum- und Zeitfelder haben eine feste Mindestbreite und ragen sonst in die Nachbarzelle */
input, select, textarea { min-width: 0; max-width: 100%; }
@supports (-webkit-touch-callout: none) { input[type=date], input[type=time], input[type=datetime-local] { -webkit-appearance: none; appearance: none; display: block; } }
input::-webkit-date-and-time-value { text-align: left; min-height: 1.4em; }
/* Tablet hochkant: vier Felder nebeneinander sind zu eng */
@media (min-width: 768px) and (max-width: 1024px) { .dlg .row4 { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 0; } }
.dt { display: flex; gap: 6px; }
.dt input[type=time] { max-width: 120px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px 14px; margin-top: 6px; }
.hint { color: var(--muted); font-size: 13px; }
.small { font-size: 12px; }
.spacer { flex: 1; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--chip); font-size: 12px; white-space: nowrap; }
.badge.ok { background: rgba(26,127,55,.14); color: var(--ok); }
.badge.err { background: rgba(207,34,46,.12); color: var(--danger); }
.badge.warn { background: var(--wait-bg); color: var(--warn); }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 4px; background: var(--c); flex: none; vertical-align: -1px; }
.msg { padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; }
.msg.err { background: rgba(207,34,46,.1); color: var(--danger); }
.msg.ok { background: rgba(26,127,55,.12); color: var(--ok); }
.msg.warn { background: var(--wait-bg); color: var(--warn); border: 1px solid var(--wait-line); }
.msg ul { margin: 6px 0 0; padding-left: 18px; }

/* ---------- Layout ---------- */
.app { height: 100%; display: flex; flex-direction: column; }
.topbar { flex: none; display: flex; align-items: center; gap: 12px; padding: 0 12px; padding-top: env(safe-area-inset-top); height: calc(var(--top-h) + env(safe-area-inset-top)); background: var(--panel); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; width: calc(var(--side-w) - 24px); text-decoration: none; color: var(--text); }
.brand-name { font-weight: 700; font-size: 16px; }
.club-select { max-width: 320px; }
.club-select select { font-weight: 600; }
.topbar-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.user-chip { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; }

.layout { flex: 1; display: flex; min-height: 0; }
.sidebar { width: var(--side-w); flex: none; display: flex; flex-direction: column; gap: 4px; padding: 12px; background: var(--panel); border-right: 1px solid var(--line); overflow-y: auto; }
.nav-title { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 8px 4px; font-weight: 700; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.nav a:hover { background: var(--hover); }
.nav a.active { background: var(--sel-bg); color: var(--primary); font-weight: 600; }
.nav a .ico { width: 20px; text-align: center; }
.side-footer { margin-top: auto; padding-top: 12px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: var(--muted); }
.side-prefs { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.main { flex: 1; min-width: 0; padding: 16px; overflow: auto; }
.page-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.page-head h1 { margin-right: auto; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.panel h2 { margin: 0 0 12px; }
.empty { color: var(--muted); font-style: italic; padding: 16px 18px; }

.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; background: var(--subtle); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tr.inactive { opacity: .55; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--hover); }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tfoot td { font-weight: 700; background: var(--subtle); }
.table.compact th, .table.compact td { padding: 6px 7px; font-size: 13px; }
td.actions { text-align: right; white-space: nowrap; }

/* Logo des Vereins, Profilbilder */
.brand img#brandLogo.club { width: auto; max-width: 140px; height: 36px; object-fit: contain; border-radius: 4px; }
.avatar { overflow: hidden; }
.avatar img, .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pic { width: 32px; height: 32px; border-radius: 50%; background: var(--chip); color: var(--muted); display: inline-grid; place-items: center; font-weight: 700; font-size: 12px; overflow: hidden; vertical-align: middle; flex: none; }
.pic.big { width: 96px; height: 96px; font-size: 30px; }
.name-cell { display: flex; align-items: center; gap: 10px; }
.contacts { display: flex; gap: 8px; flex-wrap: wrap; }
.contacts a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--text); font-size: 13px; }
.contacts a:hover { background: var(--hover); }

/* Notfall / Alarmplan */
.btn-sos { background: #d1242f; border-color: #d1242f; color: #fff; font-weight: 700; }
.btn-sos:hover { background: #a40e26; }
.sos-head { background: #d1242f; color: #fff; margin: -18px -18px 16px; padding: 14px 18px; }
.sos-head h3 { margin: 0; font-size: 20px; letter-spacing: .04em; }
.sos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-bottom: 14px; }
.sos-call { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--text); background: var(--panel); }
.sos-call.em { border-color: #d1242f; background: rgba(209,36,47,.08); }
.sos-call b { display: block; font-size: 18px; color: #d1242f; font-variant-numeric: tabular-nums; }
.sos-call small { color: var(--muted); display: block; }
.sos-sec { border-left: 4px solid #d1242f; padding: 6px 12px; margin-bottom: 12px; background: var(--subtle); border-radius: 0 8px 8px 0; }
.sos-sec h4 { margin: 0 0 4px; }
.sos-sec p { margin: 0; white-space: pre-line; }
.ed-row { display: grid; grid-template-columns: 140px 1fr 1fr 1fr 32px; gap: 6px; margin-bottom: 6px; align-items: center; }
.ed-row.l3 { grid-template-columns: 1fr 1fr 1fr 32px; }
.ed-row.l2 { grid-template-columns: 1fr 2fr 32px; }
@media (max-width: 767px) { .ed-row, .ed-row.l3, .ed-row.l2 { grid-template-columns: 1fr; } }
@media print { .sos-call b { color: #000; } }

/* Nachrichten */
.nav .count { margin-left: auto; background: var(--danger); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 0 7px; line-height: 18px; }
.chat { display: grid; grid-template-columns: 300px 1fr; gap: 0; height: calc(100vh - var(--top-h) - 110px); min-height: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.chat-list { border-right: 1px solid var(--line); overflow-y: auto; }
.chat-item { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.chat-item:hover, .chat-item.active { background: var(--sel-bg); }
.chat-item .txt { flex: 1; min-width: 0; }
.chat-item .txt small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item .unread { background: var(--primary); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 7px; font-weight: 700; }
.chat-thread { display: flex; flex-direction: column; min-width: 0; }
.chat-head { padding: 10px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); }
.bubble { max-width: 72%; padding: 8px 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); white-space: pre-wrap; word-wrap: break-word; align-self: flex-start; }
.bubble.mine { align-self: flex-end; background: var(--primary); color: #fff; border-color: var(--primary); }
.bubble small { display: block; font-size: 10px; opacity: .7; margin-top: 2px; }
.bubble .who { font-size: 11px; font-weight: 700; opacity: .8; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form textarea { min-height: 40px; height: 40px; resize: none; }
.msg-pop { position: fixed; right: 18px; bottom: 18px; z-index: 1000; width: 300px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 12px 14px; cursor: pointer; animation: pop .25s ease; }
@keyframes pop { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 767px) { .chat { grid-template-columns: 1fr; height: calc(100vh - var(--top-h) - 90px); } .chat.open .chat-list { display: none; } .chat:not(.open) .chat-thread { display: none; } }

/* Uhr in der Kopfzeile: Lokalzeit (Verein), UTC, Sonnenauf-/-untergang */
.clock { display: flex; align-items: center; gap: 14px; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; margin-right: 8px; white-space: nowrap; }
.clock b { color: var(--text); font-size: 15px; }
.clock .lbl { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; margin-left: 3px; }
.clock .sun { display: flex; gap: 8px; padding-left: 12px; border-left: 1px solid var(--line); cursor: help; }
.plan thead .sun { display: block; font-size: 10px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.plan thead .sun.closed { color: var(--danger); }
@media (max-width: 1100px) { .clock .sun { display: none; } }
@media (max-width: 767px) { .clock { gap: 8px; margin-right: 2px; } .clock .utc { display: none; } }

/* ---------- Belegungsplan ---------- */
.cal-toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.cal-toolbar .title { font-size: 18px; font-weight: 700; margin: 0 8px; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: 8px 0 0 8px; margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 8px 8px 0; }
.btn-group .btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.plan-wrap { overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.plan { border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 12px; width: 100%; }
.plan th, .plan td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); vertical-align: top; }
.plan thead th { position: sticky; top: 0; z-index: 2; background: var(--panel); padding: 6px 2px; font-weight: 500; color: var(--muted); text-align: center; white-space: nowrap; }
.plan thead th b { color: var(--text); font-size: 13px; }
.plan thead th.today b { color: #fff; background: var(--primary); border-radius: 6px; padding: 1px 6px; }
.plan .corner { left: 0; z-index: 3; width: 150px; text-align: left; padding-left: 10px; }
.plan .ac { position: sticky; left: 0; z-index: 1; background: var(--panel); padding: 8px 10px; width: 150px; }
.plan .ac b { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.plan .ac small { display: block; color: var(--muted); }
.plan .ac .no { color: var(--danger); font-size: 11px; }
.plan .lane-label { position: sticky; left: 0; z-index: 1; background: var(--wait-bg); padding: 3px 10px; color: var(--warn); font-size: 11px; font-weight: 600; }
.plan td.cell { padding: 3px; height: 58px; }
.plan td.wcell { padding: 2px 3px; background: var(--wait-bg); height: 26px; }
.plan tr.ac-end td, .plan tr.ac-end th { border-bottom: 2px solid var(--line); }
.plan td.sat { background: var(--sat-bg); }
.plan td.sun { background: var(--sun-bg); }
.plan td.today { background: var(--today-bg); }
.plan td.can-add { cursor: copy; }
.plan td.can-add:hover { box-shadow: inset 0 0 0 2px var(--sel-bg); }
.ev { border-radius: 4px; padding: 2px 5px; margin-bottom: 2px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; color: #fff; background: var(--c, var(--primary)); }
.ev small { opacity: .9; }
.ev.mine { box-shadow: inset 0 0 0 2px rgba(255,255,255,.7); }
.ev.block { background: repeating-linear-gradient(135deg, var(--block-bg) 0 6px, transparent 6px 12px); color: var(--danger); border: 1px solid var(--danger); }
.ev.wait { background: transparent; color: var(--warn); border: 1px dashed var(--wait-line); }
.ev.cont-l { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.ev.cont-r { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.legend { display: flex; gap: 16px; margin-top: 10px; color: var(--muted); font-size: 12px; flex-wrap: wrap; }
.legend .ev { display: inline-block; cursor: default; margin: 0 4px 0 0; padding: 0 10px; }

/* ---------- Dialoge ---------- */
.dlg { border: 0; padding: 0; border-radius: 14px; width: min(600px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: var(--shadow); background: var(--panel); color: var(--text); }
.dlg-wide { width: min(900px, calc(100vw - 24px)); }
.dlg::backdrop { background: rgba(15, 23, 42, .45); }
.dlg-body { display: flex; flex-direction: column; max-height: calc(100vh - 40px); margin: 0; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.dlg-head h2 { margin: 0; font-size: 18px; }
.dlg-content { padding: 18px; overflow-y: auto; flex: 1; }
.dlg-foot { display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--subtle); border-radius: 0 0 14px 14px; flex-wrap: wrap; }
fieldset.box { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 2px; margin: 0 0 14px; }
fieldset.box legend { padding: 0 6px; font-weight: 600; color: var(--muted); font-size: 13px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 1000; padding: 10px 16px; border-radius: 10px; background: #1b1f24; color: #fff; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }
.toast-err { background: var(--danger); }

.theme-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.theme-toggle button { border: 0; background: transparent; padding: 4px 9px; cursor: pointer; color: var(--muted); font-size: 13px; }
.theme-toggle button.active { background: var(--primary); color: #fff; }
.lang-flags { display: inline-flex; gap: 4px; }
.lang-flags button { border: 1px solid transparent; background: none; padding: 2px; border-radius: 4px; cursor: pointer; opacity: .55; line-height: 0; }
.lang-flags button.active { opacity: 1; border-color: var(--primary); }

/* Druck (Flugauswertung u. a.) */
.print-only { display: none; }
@media print {
  .topbar, .sidebar, .no-print, .toast, .backdrop { display: none !important; }
  .print-only { display: block; }
  html, body, .app, .layout, .main { height: auto; overflow: visible; background: #fff; color: #000; }
  .main { padding: 0; }
  .panel, .table-wrap { border: 0; padding: 0; box-shadow: none; background: #fff; }
  .rep-group { break-inside: avoid-page; margin-bottom: 12px; }
  .table th, .table td { padding: 3px 5px; font-size: 10px; color: #000; background: #fff; }
  .table tfoot td { background: #f3f3f3; }
  @page { size: A4 landscape; margin: 12mm; }
}

/* Anmeldung */
.auth-page { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: min(400px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px; box-shadow: var(--shadow); }
.auth-card .logo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; margin-bottom: 18px; }
.auth-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }

.only-mobile { display: none !important; }
.backdrop { display: none; }
@media (max-width: 767px) {
  :root { --top-h: 52px; }
  .only-mobile { display: revert !important; }
  .hide-mobile { display: none !important; }
  .brand { width: auto; }
  .brand-name { display: none; }
  .topbar { gap: 6px; padding: 0 6px; }
  .club-select { flex: 1; max-width: none; }
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 60; width: min(280px, 84vw); transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow); padding-top: calc(16px + env(safe-area-inset-top)); }
  .sidebar-open .sidebar { transform: none; }
  .sidebar-open .backdrop { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(15, 23, 42, .4); }
  .main { padding: 10px; }
  .row2, .row3, .row4 { grid-template-columns: 1fr; gap: 0; }
  .row4.keep, .row2.keep { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dlg, .dlg-wide { width: 100vw; max-width: 100vw; height: 100%; max-height: 100%; margin: 0; border-radius: 0; }
  .dlg-body { height: 100%; max-height: 100%; }
  .plan .ac, .plan .corner { width: 96px; }
  .plan .ac small { display: none; }
}

/* Mängelbuch */
.df-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.df-desc { white-space: pre-wrap; background: var(--subtle); border-radius: 8px; padding: 10px 12px; }
.df-photos { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.df-photos img { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.df-events { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.df-events li { border-left: 3px solid var(--line); padding-left: 10px; }
.df-note { white-space: pre-wrap; }
.df-inline summary { cursor: pointer; font-weight: 600; }
.df-inline[open] summary { margin-bottom: 8px; }
a.df-link { display: block; text-decoration: none; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--subtle); }

.cal-toolbar select { width: auto; min-width: 160px; }
.fee-offer { display: flex; gap: 12px; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 8px; }

/* Flugplanung */
.main:has(.fp-wrap) { padding: 0; overflow: hidden; }
.fp-wrap { display: grid; grid-template-columns: 1fr 430px; height: calc(100vh - var(--top-h)); }
.fp-map-col { position: relative; min-height: 0; }
.fp-map, .fp-map.maplibregl-map { position: absolute; inset: 0; }
.fp-side { overflow: auto; padding: 12px; border-left: 1px solid var(--line); background: var(--bg); }
.fp-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 10px; }
.fp-box h3 { margin: 0 0 8px; font-size: 14px; }
.fp-row { display: flex; gap: 6px; margin-bottom: 6px; }
.fp-row > select, .fp-row > input { flex: 1; min-width: 0; }
.fp-pts { margin: 0 0 8px; padding: 0; list-style: none; display: grid; gap: 4px; }
.fp-pts li, .fp-alt { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 6px; background: var(--subtle); }
.fp-role { font-size: 11px; color: var(--muted); min-width: 64px; }
.fp-pt-btns { margin-left: auto; display: flex; gap: 2px; }
.fp-pt-btns button, .fp-alt button { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 4px; padding: 0 6px; cursor: pointer; }
.fp-alt button { margin-left: auto; }
.fp-layers { position: absolute; top: 10px; right: 10px; background: rgba(255,255,255,.94); color: #1b1f24; border-radius: 8px; padding: 6px 8px; font-size: 12px; display: grid; gap: 2px; box-shadow: var(--shadow); max-height: 60%; overflow: auto; }
.fp-layers label { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.sw { display: inline-block; width: 12px; height: 4px; border-radius: 2px; background: var(--c); margin-right: 4px; vertical-align: middle; }
.fp-search { position: absolute; top: 10px; left: 56px; width: min(320px, 50%); }
.fp-search input { width: 100%; box-shadow: var(--shadow); }
.fp-sres { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; margin-top: 4px; box-shadow: var(--shadow); max-height: 300px; overflow: auto; }
.fp-sres button { display: block; width: 100%; text-align: left; border: 0; background: none; color: var(--text); padding: 6px 10px; cursor: pointer; }
.fp-sres button:hover { background: var(--hover); }
.fp-note { position: absolute; bottom: 4px; left: 110px; background: rgba(255,255,255,.85); color: #333; padding: 1px 6px; border-radius: 4px; }
/* Höhenprofil unter der Karte */
.fp-map-col { --prof-h: 0px; }
.fp-map-col.has-prof { --prof-h: 210px; }
.fp-map-col.has-prof.prof-closed { --prof-h: 34px; }
.fp-map-col .fp-map, .fp-map-col .fp-map.maplibregl-map { bottom: var(--prof-h); }
.fp-map-col .fp-note { bottom: calc(var(--prof-h) + 4px); }
.fp-prof { position: absolute; left: 0; right: 0; bottom: 0; height: var(--prof-h); background: var(--panel); border-top: 1px solid var(--line); display: flex; flex-direction: column; }
.fp-prof-h { display: flex; align-items: center; gap: 10px; padding: 6px 10px; min-height: 33px; flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
.fp-prof-h .linklike { color: var(--text); }
.fp-prof-src { margin-left: auto; overflow: hidden; text-overflow: ellipsis; }
.fp-prof-plot { position: relative; flex: 1; min-height: 0; }
.fp-prof-plot svg { position: absolute; inset: 0; display: block; }
.fp-prof-tip { position: absolute; top: 4px; pointer-events: none; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; font-size: 12px; box-shadow: var(--shadow); white-space: nowrap; z-index: 2; }
.fp-prof svg text { font-size: 10px; }
.fp-prof .pg { stroke: var(--line); stroke-width: 1; }
.fp-prof .pt { fill: var(--muted); }
.fp-prof .pa { stroke-width: 1.2; }
.fp-prof .pal { font-size: 10px; font-weight: 700; }
.fp-prof .ptm { fill: #c9b79c; fill-opacity: .55; }
.fp-prof .ptc { fill: #8d7656; fill-opacity: .85; }
.fp-prof .pw { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; opacity: .7; }
.fp-prof .pwl { fill: var(--text); font-weight: 700; }
.fp-prof .pcr { stroke: #c026d3; stroke-width: 1; stroke-dasharray: 4 4; opacity: .4; }
.fp-prof .pf { fill: none; stroke: #c026d3; stroke-width: 2.5; stroke-linejoin: round; }
.fp-prof .pb.warn { fill: #f59e0b; }
.fp-prof .pb.err { fill: #dc2626; }
.fp-prof .px { stroke: var(--text); stroke-width: 1; opacity: .5; }
:root[data-theme="dark"] .fp-prof .ptm { fill: #6b5a43; fill-opacity: .6; }
:root[data-theme="dark"] .fp-prof .ptc { fill: #a88d68; fill-opacity: .8; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .fp-prof .ptm { fill: #6b5a43; fill-opacity: .6; }
  :root:not([data-theme="light"]) .fp-prof .ptc { fill: #a88d68; fill-opacity: .8; }
}
.fp-pop { font-size: 13px; color: #1b1f24; }
.fp-pop-btns { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; }
.fp-pop-as { border-top: 1px solid #e3e6ea; padding-top: 6px; display: grid; gap: 4px; font-size: 12px; max-height: 220px; overflow: auto; }
.fp-log td, .fp-log th { white-space: nowrap; }
.fp-altrow td { font-style: italic; color: var(--muted); }
.fp-rwy { margin-bottom: 6px; }
.fp-wx { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
.fp-wx:first-of-type { border-top: 0; margin-top: 0; }
.fp-wx-h { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.fp-links { margin-left: auto; display: flex; gap: 8px; font-size: 12px; }
.fp-raw { white-space: pre-wrap; font-size: 12px; background: var(--subtle); border-radius: 6px; padding: 6px 8px; margin: 6px 0; }
.linklike { border: 0; background: none; color: var(--primary); cursor: pointer; padding: 0; font: inherit; }
.ok-txt { color: var(--ok); }
.badge.ok, .badge.warn, .badge.err { font-weight: 600; }
@media (max-width: 900px) {
  .main:has(.fp-wrap) { overflow: auto; }
  .fp-wrap { grid-template-columns: 1fr; height: auto; }
  .fp-map-col { height: 60vh; }
  .fp-map-col.has-prof { --prof-h: 180px; height: calc(60vh + 180px); }
  .fp-map-col.has-prof.prof-closed { height: calc(60vh + 34px); }
  .fp-prof-src { display: none; }
  .fp-side { border-left: 0; }
  .fp-layers { max-height: 45%; }
}
@media print {
  .fp-wrap { display: block; height: auto; }
  .fp-map-col { display: none; }
  .fp-side { border: 0; padding: 0; overflow: visible; }
  .fp-box { break-inside: avoid; border: 1px solid #ccc; }
}
.fp-layers select { margin-bottom: 4px; font-size: 12px; padding: 2px 4px; min-height: 0; }
.fp-below td { color: var(--muted); }
.fp-side .table { width: 100%; }
.fp-side .table td, .fp-side .table th { white-space: normal; }
.fp-side .fp-log td, .fp-side .fp-log th { white-space: nowrap; padding-left: 4px; padding-right: 4px; }

/* Dokumente und Gruppen */
.doc-vis { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 16px; max-height: 320px; overflow: auto; }
.doc-vis-group { display: grid; gap: 2px; align-content: start; }
.progress { height: 6px; background: var(--chip); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.progress > div { height: 100%; width: 0; background: var(--primary); transition: width .2s; }
.plain-list { margin: 0; padding-left: 18px; columns: 2; }

/* Diagramme (Statistik) – geprüfte Kategorienpalette, hell und dunkel */
:root { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #8b8a85; }
:root[data-theme="dark"] { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #0ca30c; --s7: #9085e9; --s8: #77766f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #0ca30c; --s7: #9085e9; --s8: #77766f; } }
.s1 { background: var(--s1); } .s2 { background: var(--s2); } .s3 { background: var(--s3); } .s4 { background: var(--s4); }
.s5 { background: var(--s5); } .s6 { background: var(--s6); } .s7 { background: var(--s7); } .s8 { background: var(--s8); }
.viz-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.viz-tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; display: grid; }
.viz-tile span { color: var(--muted); font-size: 12px; } .viz-tile b { font-size: 24px; font-variant-numeric: tabular-nums; }
.viz-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.viz-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.viz-col { display: grid; grid-template-columns: auto 1fr; gap: 6px; height: 240px; margin: 8px 0 26px; }
.viz-axis { display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: var(--muted); text-align: right; transform: translateY(-6px); padding-bottom: 0; }
.viz-plot { position: relative; display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--line); }
.viz-grid { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--line); opacity: .7; pointer-events: none; }
.viz-slot { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: default; }
.viz-slot:hover { background: var(--hover); }
.viz-stack { width: min(60%, 34px); display: flex; flex-direction: column; gap: 2px; min-height: 0; }
.viz-stack > .viz-seg:first-child { border-radius: 4px 4px 0 0; }
.viz-seg { min-height: 1px; }
.viz-x { position: absolute; bottom: -20px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.viz-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); margin: 4px 0 6px; }
.viz-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.viz-h { display: grid; gap: 6px; }
.viz-hrow { display: grid; grid-template-columns: minmax(90px, 30%) 1fr; gap: 10px; align-items: center; font-size: 13px; }
.viz-hl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viz-hbars { display: grid; gap: 2px; }
.viz-hb-line { display: flex; align-items: center; gap: 6px; height: 12px; }
.viz-hb-line:hover { background: var(--hover); }
.viz-hb { height: 10px; border-radius: 0 4px 4px 0; min-width: 1px; }
.viz-hv { font-size: 11px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.viz-tip { position: fixed; z-index: 100; background: var(--panel); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 8px; padding: 6px 10px; font-size: 12px; pointer-events: none; max-width: 260px; }

/* Support-Zugang des Betreibers */
.support-banner { position: sticky; top: 0; z-index: 60; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 16px;
  background: #b42318; color: #fff; font-size: 14px; }
.support-banner .btn { margin-left: auto; background: #fff; color: #b42318; border-color: #fff; }

/* Mitglieder-Auswahl (Flugzeug: Freigaben, Halter) */
.pp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0; }
.pp-list { max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.pp-item { display: flex; align-items: center; justify-content: space-between; padding: 4px 10px; border-bottom: 1px solid var(--line); }
.pp-item:last-child { border-bottom: 0; }
.pp-item button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 14px; }
.pp-item button:hover { color: #b42318; }
.pp-empty { padding: 8px 10px; }
.pp-add { position: relative; margin: 8px 0 10px; }
.pp-add input { width: 100%; }
.pp-res { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; max-height: 240px; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pp-res button { display: block; width: 100%; text-align: left; padding: 6px 10px; border: 0; background: none; color: var(--text); cursor: pointer; }
.pp-res button:hover { background: var(--hover); }
.pp-res .hint { padding: 6px 10px; }

/* Kalender: feste Balkenhöhe, damit mehrtägige Balken in allen Tagen auf derselben Höhe liegen */
.plan .ev, .plan .ev-sp { height: 20px; box-sizing: border-box; margin-bottom: 2px; }
.plan .ev { line-height: 16px; }
.plan .ev.span { position: relative; z-index: 0; }
.plan td.past { background-image: repeating-linear-gradient(135deg, transparent 0 8px, rgba(127,127,127,.06) 8px 16px); cursor: default; }

/* Belegungsplan als Liste */
.cal-filter { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.cal-filter select { width: auto; min-width: 180px; }
.res-list .rl-head th { background: var(--bg-soft, rgba(127,127,127,.08)); text-align: left; font-weight: 700; padding-top: 10px; }
.res-list .rl-head.today th { color: var(--primary); }
.res-list .rl-row { cursor: pointer; }
.res-list .rl-row:hover td { background: rgba(127,127,127,.06); }
.res-list .rl-row.mine td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
.res-list .rl-row.waitlist .rl-st { color: var(--muted); font-style: italic; }
.res-list .rl-row.block .rl-st { color: var(--danger, #c0392b); }
.res-list .nowrap { white-space: nowrap; }
.res-list .swatch { margin-right: 6px; }

.fp-asx { font-size: 11px; color: #0f766e; font-weight: 600; }

.fp-heights { white-space: nowrap; font-weight: 600; }
.fp-heights .fp-below-h { font-weight: 400; color: var(--muted); }
.fp-print-maps { display: none; }
@media print {
  .fp-print-maps { display: block; }
  .fp-print-page { break-before: page; page-break-before: always; }
  .fp-print-page img { display: block; width: auto; height: auto; max-width: 100%; max-height: 165mm; margin: 0 auto; border: 1px solid #999; }
  .fp-print-src { font-size: 8pt; color: #555; margin-top: 4mm; break-inside: avoid; }
  .fp-print-page h3 { margin: 0 0 6px; }
}

.fp-box > h3 { display: flex; align-items: center; gap: 6px; }
.fp-tog { margin-left: auto; border: 1px solid var(--line, #ddd); background: transparent; border-radius: 6px; width: 26px; height: 24px; line-height: 1; cursor: pointer; color: var(--muted); font-size: 13px; padding: 0; }
.fp-tog:hover { color: inherit; background: rgba(127,127,127,.1); }
.fp-box.collapsed > :not(h3) { display: none; }
.fp-box.collapsed > h3 { margin-bottom: 0; }
@media print { .fp-box.collapsed > :not(h3) { display: revert; } }

/* Nachrichten: Abschnitte, Kanäle, Personensuche */
.chat-sec { padding: 10px 12px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--bg, transparent); }
.pic.chan { display: inline-flex; align-items: center; justify-content: center; background: var(--sel-bg); font-size: 16px; }
.chat-head .chat-title { display: flex; flex-direction: column; min-width: 0; }
.chat-head .chat-title b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-ro { padding: 12px 16px; margin: 0; border-top: 1px solid var(--line); }
.ps-q { margin-bottom: 8px; }
.ps-res { max-height: 45vh; }
.ps-item { cursor: pointer; justify-content: flex-start; gap: 10px; padding: 6px 10px; }
.ps-item:hover { background: var(--sel-bg); }
.ps-item.on { background: var(--sel-bg); }
.ps-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ps-txt small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-mark { font-weight: 700; color: var(--primary); width: 20px; text-align: center; }
.ps-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ps-chip { background: var(--sel-bg); border-radius: 999px; padding: 2px 4px 2px 10px; font-size: 13px; }
.ps-chip button { border: 0; background: none; cursor: pointer; color: var(--muted); }
.msg-btn { text-decoration: none; font-size: 16px; }

/* Profil-Tabs */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs .tab { border: 0; background: none; padding: 9px 14px; cursor: pointer; color: var(--muted); font: inherit; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; border-radius: 6px 6px 0 0; }
.tabs .tab:hover { color: inherit; background: var(--sel-bg); }
.tabs .tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.prof-pane .page-head h1 { display: none; }
.prof-pane .page-head { justify-content: flex-end; margin-bottom: 8px; }
.prof-pane .page-head:empty { display: none; }
input.mono, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; }
input.bad { border-color: #b42318; }
.bank-check { min-height: 18px; margin: -4px 0 8px; }
@media (max-width: 600px) { .tabs .tab { padding: 8px 10px; font-size: 13px; } }

.back-link { text-decoration: none; color: var(--muted); margin-right: 4px; }
.ac-save { display: flex; gap: 8px; margin: 4px 0 20px; }
.tabs .tab[disabled] { opacity: .45; cursor: not-allowed; }

.pr-sec { border-top: 1px solid var(--line); padding: 10px 0; }
.pr-sec summary { cursor: pointer; font-weight: 700; }
.pr-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.pr-row input { max-width: 140px; }
.pr-calc { color: var(--muted); font-size: 12px; min-width: 110px; }

fieldset.box-err { border-color: #b42318; }

/* Listen: Sortierung, Suche, Auswahl mit Suche */
th.sort-th { cursor: pointer; user-select: none; white-space: nowrap; }
th.sort-th:hover { color: var(--primary); }
th.sort-th::after { content: ' ↕'; opacity: .3; font-size: 10px; }
th.sort-th[data-dir="asc"]::after { content: ' ▲'; opacity: .8; }
th.sort-th[data-dir="desc"]::after { content: ' ▼'; opacity: .8; }
.list-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.list-bar .list-search { max-width: 320px; }
.combo { position: relative; }
.combo-in { width: 100%; }
.combo-list { position: absolute; z-index: 50; left: 0; right: 0; top: 100%; max-height: 260px; overflow: auto; background: var(--panel, #fff); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); margin-top: 2px; }
.combo-opt { padding: 6px 10px; cursor: pointer; }
.combo-opt.act, .combo-opt:hover { background: var(--sel-bg); }
.combo-opt.on { font-weight: 700; }
.combo-none { padding: 8px 10px; color: var(--muted); }

/* Belegungsplan mit Zeitachse (06–22 Uhr je Tag) */
.tplan td.tcell { padding: 0; position: relative; overflow: visible; }
.tplan td.tcell .tl { position: relative; height: 100%; }
.tplan .ev.tb { position: absolute; z-index: 1; height: 21px; margin: 0; padding: 1px 4px; font-size: 11px; line-height: 19px; box-sizing: border-box; min-width: 0; }
.tplan .ev.tb:hover { z-index: 3; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.tplan .ev.fi { box-shadow: inset 0 -3px 0 #f59e0b; }
.tplan .ev.mine.fi { box-shadow: inset 0 0 0 2px rgba(255,255,255,.7), inset 0 -3px 0 #f59e0b; }
.ev.fi-book { background: #f59e0b; color: #fff; }
.ev.fi-book.pending { background: repeating-linear-gradient(135deg, #f59e0b 0 6px, #fbbf24 6px 12px); }
.fi-avail { position: absolute; top: 0; bottom: 0; background: rgba(59,130,246,.13); border-left: 1px solid rgba(59,130,246,.35); border-right: 1px solid rgba(59,130,246,.35); pointer-events: none; }
.legend .fi-avail.lg { position: static; display: inline-block; width: 22px; height: 12px; vertical-align: middle; margin-right: 4px; }
.tplan thead .tl-axis { display: flex; justify-content: space-between; font-size: 9px; color: var(--muted); opacity: .7; margin-top: 3px; padding: 0 2px; font-style: normal; }
.tplan thead .tl-axis i { font-style: normal; }
.plan .sec-row th.sec-h { position: sticky; left: 0; text-align: left; background: var(--sel-bg); padding: 6px 10px; font-size: 12px; border-bottom: 1px solid var(--line); }
.plan .fi-name b { font-size: 12px; }
.ac-st { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 4px; font-size: 11px; font-weight: 700; color: #fff; }
.ac-st.ok { background: #16a34a; } .ac-st.warn { background: #f59e0b; } .ac-st.bad { background: #dc2626; }

.tplan .ev.tb { height: 34px; line-height: 1.15; padding: 2px 3px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; overflow: hidden; }
.tplan .ev.tb .tb1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tplan .ev.tb .tb2 { font-size: 10px; line-height: 13px; }

.ac-pop { position: fixed; z-index: 1000; background: var(--panel, #fff); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 28px rgba(0,0,0,.18); padding: 8px 12px; max-width: 460px; font-size: 13px; pointer-events: none; }
.ac-pop .pop-l { display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; }
.ac-pop .ac-st { flex: none; margin-top: 1px; }
.plan .ac .ac-st[data-acpop] { cursor: help; }

.tplan .ev.duty { background: var(--c, #16a34a); }
.tplan .ev.duty.open { background: repeating-linear-gradient(135deg, var(--c, #16a34a) 0 6px, color-mix(in srgb, var(--c, #16a34a) 70%, #fff) 6px 12px); }

/* Feiertage, gesperrte Tage, Jetzt-Linie */
.tplan thead .hol { display: block; font-size: 10px; color: #b45309; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tplan thead .clo { display: block; font-size: 10px; color: #fff; background: #dc2626; border-radius: 4px; padding: 0 4px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tplan thead th.closed-h { background: #fee2e2; }
.tplan td.hol-day { background-color: rgba(245, 158, 11, .07); }
.tplan td.closed-day { background: repeating-linear-gradient(135deg, rgba(220,38,38,.16) 0 8px, rgba(220,38,38,.08) 8px 16px) !important; }
.nowline { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid #ef4444; z-index: 2; pointer-events: none; }

.rg-sec { margin-bottom: 26px; }
.rg-sec .page-head h1 { display: block !important; font-size: 18px; }

#mpick .mp-wrap { max-height: 58vh; overflow: auto; }
#mpick .mp-table td:first-child { width: 28px; }
#mpick .mp-table tbody tr { cursor: pointer; }
#mpick .mp-table thead th { position: sticky; top: 0; background: var(--panel); z-index: 1; }

.fp-aslist .fp-at { white-space: nowrap; }
.fp-aslist .fp-askind { font-size: 12px; color: var(--muted); margin-bottom: 1px; }

.fp-side .fp-aslist td { padding-left: 5px; padding-right: 5px; }
.fp-side .fp-aslist td.fp-heights { white-space: nowrap; font-size: 13px; }
.fp-aslist .fp-asn { font-size: 12px; overflow-wrap: anywhere; }
.fp-aslist .fp-askind { font-size: 11px; white-space: nowrap; }
.fp-aslist tr.fp-asrow { cursor: pointer; }
.fp-aslist tr.fp-asrow:hover td { background: var(--subtle); }
.fp-side .fp-aslist td.fp-at { white-space: nowrap; }

.fp-enroute .fp-erw { margin-top: 8px; }
.fp-enroute .fp-erw-h { font-size: 13px; margin-bottom: 2px; }

.fp-notam { margin-bottom: 10px; }
.fp-notam .fp-raw { white-space: pre-wrap; }

.fp-aslist .fp-asn { font-size: 13px; }
.fp-aslist .fp-heights { font-size: 13px; margin-top: 1px; }
.fp-aslist td.fp-at { width: 1%; vertical-align: top; }

/* Menü am Profilbild */
.user-menu-wrap { position: relative; }
button.user-chip { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.avatar-wrap { position: relative; display: inline-block; }
.av-badge { position: absolute; top: -4px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #dc2626; color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; box-shadow: 0 0 0 2px var(--panel, #fff); }
.user-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; background: var(--panel, #fff); border: 1px solid var(--line, #ddd);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: 6px; z-index: 1000; }
.user-menu a, .user-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 6px; color: inherit;
  text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.user-menu a:hover, .user-menu button:hover { background: var(--subtle, rgba(127,127,127,.1)); }
.user-menu .count { margin-left: auto; }
.user-menu hr { border: 0; border-top: 1px solid var(--line, #ddd); margin: 4px 0; }
.user-menu .ico { width: 20px; text-align: center; }
.user-menu .count { background: var(--danger); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 0 7px; line-height: 18px; }

/* Suchbare Auswahllisten (comboSelect) als Dropdown erkennbar */
.combo input.combo-in, .field .combo input.combo-in { padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23808a96' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
.combo input.combo-in:focus { cursor: text; }

/* Sprachauswahl (Dropdown) */
.lang-dd { position: relative; display: inline-block; }
.lang-dd-btn, .lang-dd-menu button { display: flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--line, #ddd); border-radius: 8px;
  padding: 4px 8px; cursor: pointer; font: inherit; font-size: 13px; color: inherit; line-height: 1; }
.lang-dd-btn:hover { background: var(--subtle, rgba(127,127,127,.1)); }
.lang-dd svg { width: 21px; height: 14px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); flex: none; }
.lang-dd-caret { color: var(--muted); font-size: 11px; }
.lang-dd-menu { position: absolute; left: 0; top: calc(100% + 4px); min-width: 160px; background: var(--panel, #fff); border: 1px solid var(--line, #ddd);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: 4px; z-index: 1000; }
.lang-dd-menu.up { top: auto; bottom: calc(100% + 4px); }
.lang-dd-menu button { width: 100%; border: 0; padding: 7px 8px; border-radius: 6px; }
.lang-dd-menu button:hover { background: var(--subtle, rgba(127,127,127,.1)); }
.lang-dd-menu button.active { font-weight: 700; }
.lang-dd-check { margin-left: auto; color: var(--primary); }

/* Webcams (Windy) in der Flugplanung */
.fp-cam-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.fp-cam-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: none; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.fp-cam-item.on { border-color: var(--primary); background: var(--sel-bg, rgba(31,111,235,.08)); }
.fp-cam-player { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.fp-cam-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.fp-cams-credit { margin: 8px 0 0; }
/* Bordbuch: Zählerfotos */
.fl-photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.fl-photos:empty { display: none; }
.fl-photos img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.fl-photo-btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 2px; }
.tplan .ev.tb .tbn { font-size: 10px; line-height: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
