:root {
    --red: #c8102e;
    --red-dark: #a50d25;
    --red-soft: #fdf1f2;
    --green: #22a447;
    --ink: #1c1f24;
    --muted: #6b7280;
    --line: #e3e6ea;
    --bg: #eef0f3;
    --panel: #ffffff;
    --sidebar: #1f2124;
    --radius: 6px;
    --topbar-h: 58px;
    --sidebar-w: 228px;
    --sidebar-w-collapsed: 64px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: var(--ink);
    background: var(--bg);
}

a { color: inherit; }
h1, h2, h3 { margin: 0; }
small { color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.red { color: var(--red); }

/* ---------- Buttons & Formulare ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 16px; border-radius: var(--radius);
    font: inherit; font-weight: 700; cursor: pointer;
    border: 1px solid transparent; text-decoration: none;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 4px 12px rgba(200, 16, 46, .25); }
.btn-primary:hover:not(:disabled) { background: var(--red-dark); }
.btn-outline { background: #fff; color: var(--ink); border-color: #cfd4da; }
.btn-outline:hover:not(:disabled) { border-color: var(--ink); }
.btn-block { width: 100%; }
.btn-danger { color: var(--red-dark); }
.btn-danger:hover:not(:disabled) { border-color: var(--red); background: var(--red-soft); }
.btn-sm { padding: 6px 10px; font-size: 12px; box-shadow: none; }

label { display: block; font-size: 12px; font-weight: 700; margin: 16px 0 6px; }
label small { font-weight: 400; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=url], input[type=tel] {
    width: 100%; padding: 10px 12px; font: inherit;
    border: 1px solid #cfd4da; border-radius: var(--radius); background: #fff;
}
textarea {
    width: 100%; padding: 10px 12px; font: inherit; resize: vertical;
    border: 1px solid #cfd4da; border-radius: var(--radius); background: #fff;
}
select {
    width: 100%; padding: 10px 12px; font: inherit;
    border: 1px solid #cfd4da; border-radius: var(--radius); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(200, 16, 46, .25); border-color: var(--red); }

.alert { padding: 10px 12px; border-radius: var(--radius); margin: 16px 0; font-size: 13px; }
.alert-error { background: var(--red-soft); color: var(--red-dark); border: 1px solid #f3c4cb; }
.alert-warn { background: #fff5e0; color: #6b4600; border: 1px solid #f5d49a; }
.alert-warn ul { margin: 6px 0; padding-left: 20px; }
.alert-warn form.inline { margin-left: 8px; }
.alert-success { background: #edf8f0; color: #17692f; border: 1px solid #bfe5c9; }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot-green { background: var(--green); }
.dot-red { background: var(--red); }

/* ---------- Anmeldung / Registrierung ---------- */
.auth-body {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 24px 16px;
}
.auth-card {
    width: 100%; max-width: 450px; background: var(--panel);
    border-radius: 14px; padding: 48px 34px 34px;
    box-shadow: 0 20px 50px rgba(20, 30, 50, .12);
}
.auth-logo { display: block; width: 100%; max-width: 370px; margin: 0 auto 40px; }
.auth-card h1 { text-align: center; font-size: 28px; margin-bottom: 8px; }
.auth-form .btn { margin-top: 24px; }
.req::after, .req-star { content: " *"; color: var(--red); }
.req-note { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.field-hint { display: block; margin-top: 5px; font-size: 11px; line-height: 1.4; }
.auth-hint { margin: 20px 0 0; padding: 10px 12px; background: #f4f5f7; border-radius: var(--radius); font-size: 12px; color: var(--muted); }
.auth-switch { text-align: center; margin: 20px 0 0; font-size: 13px; color: var(--muted); }
.auth-switch a { color: var(--red); font-weight: 700; text-decoration: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .form-row { grid-template-columns: 1fr; } }

/* ---------- App-Layout ---------- */
/* Festes Seitengerüst: Seitenleiste und Kopfzeile stehen, nur .content scrollt */
.app-body { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
    width: var(--sidebar-w); flex-shrink: 0; background: var(--sidebar); color: #fff;
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; height: 100dvh;
    transition: width .2s ease; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; -ms-overflow-style: none; /* scrollbar unsichtbar – Scrollen per Mausrad/Wischen bleibt */
}
.sidebar::-webkit-scrollbar { display: none; width: 0; height: 0; }
.sidebar-head { position: sticky; top: 0; z-index: 2; }
/* Kopf der Seitenleiste exakt so hoch wie die Kopfzeile */
.sidebar-head {
    height: var(--topbar-h); flex-shrink: 0; display: flex; align-items: center;
    padding: 0 12px; background: #fff; border-bottom: 1px solid var(--line);
}
.sidebar nav { padding-top: 0; }
.sidebar nav a {
    position: relative; display: flex; align-items: center; gap: 12px;
    padding: 14px 22px; text-decoration: none; font-size: 14px; color: #e6e7e9; white-space: nowrap;
}
.sidebar nav a:hover { background: rgba(255, 255, 255, .06); }
.sidebar nav a.active { background: var(--red); color: #fff; }
.nav-badge {
    margin-left: auto; min-width: 20px; padding: 2px 6px; border-radius: 10px;
    background: #fff; color: var(--red); font-size: 11px; font-weight: 700; text-align: center;
}
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; display: flex; }
.icon { display: block; }
.sidebar-foot { margin-top: auto; padding: 18px 22px; font-size: 12px; white-space: nowrap; }

.sidebar-toggle {
    display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px;
    border: 1px solid var(--line); border-radius: var(--radius);
    background: #fff; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.sidebar-toggle:hover { border-color: var(--ink); }

/* Logo rechts in der Kopfzeile – nur die Höhe vorgeben, Breite folgt dem Seitenverhältnis */
.topbar-logo { display: block; flex-shrink: 0; padding-left: 22px; border-left: 1px solid var(--line); }
.topbar-logo img { display: block; height: 40px; width: auto; }

/* Eingeklappte Seitenleiste: nur Symbole, Logo zeigt nur die Karte */
@media (min-width: 701px) {
    .sb-collapsed .sidebar { width: var(--sidebar-w-collapsed); }
    .sb-collapsed .sidebar-head { justify-content: center; padding: 0; }
    .sb-collapsed .sidebar nav a { justify-content: center; padding: 14px 0; }
    .sb-collapsed .nav-label { display: none; }
    .sb-collapsed .nav-section { margin: 10px 12px 4px; padding: 0; }
    .sb-collapsed .nav-badge {
        position: absolute; top: 6px; right: 8px; margin: 0; min-width: 16px; padding: 1px 4px; font-size: 10px;
    }
    .sb-collapsed .sidebar-foot { text-align: center; padding: 18px 0; }
    .sb-collapsed .sidebar-foot .dot { margin: 0; }
}

.app-main { flex: 1; min-width: 0; height: 100vh; display: flex; flex-direction: column; }
.topbar {
    height: var(--topbar-h); flex-shrink: 0; background: #fff; border-bottom: 1px solid var(--line);
    display: flex; align-items: center; justify-content: flex-end; gap: 26px;
    padding: 0 24px; font-size: 12px;
}
.topbar { position: relative; z-index: 40; }
.topbar .status { color: var(--muted); }
.topbar .status b { color: var(--ink); }
.topbar .clock { color: var(--muted); font-variant-numeric: tabular-nums; }
.logout-form { margin: 0; }
/* Menü-Knopf und Hintergrund nur am Handy */
.menu-knopf { display: none; align-items: center; gap: 6px; height: 38px; padding: 0 12px; margin-right: auto;
    border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); font: inherit; font-size: 18px; font-weight: 700; cursor: pointer; }
.menu-knopf span { font-size: 14px; }
.menu-backdrop { display: none; }
.link-red { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--red); cursor: pointer; }

.content { padding: 22px 16px 22px 22px; flex: 1; min-height: 0; overflow-y: auto; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.page-head h1 { font-size: 24px; overflow-wrap: anywhere; }
.page-head > div { min-width: 0; }
.page-head p { margin: 4px 0 0; }
.page-actions { display: flex; gap: 10px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.empty { padding: 24px; color: var(--muted); margin: 0; }

/* ---------- Einsatzübersicht ---------- */
.split { display: grid; grid-template-columns: minmax(300px, 615px) 1fr; min-height: calc(100vh - 170px); }
.split .panel { border-radius: 0; }
.list-panel { border-right: 0; }

.search { position: relative; padding: 12px; }
.search input { padding-left: 38px; }
.search-icon { position: absolute; left: 26px; top: 50%; transform: translateY(-50%); color: var(--muted); }

.list-head {
    display: grid; grid-template-columns: 1fr 1fr 24px;
    padding: 8px 14px; background: #f7f8fa; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.list-item {
    display: grid; grid-template-columns: 1fr 1fr 24px; align-items: center;
    padding: 18px 14px 18px 12px; border-bottom: 1px solid var(--line); border-left: 3px solid transparent;
    text-decoration: none;
}
.list-item:hover { background: #fafafa; }
.list-item.selected { background: var(--red-soft); border-left-color: var(--red); }
.list-item b { display: block; margin-bottom: 4px; }
.list-item small { font-size: 12px; }
.chev { font-size: 22px; text-align: right; }

.detail-head { display: flex; justify-content: space-between; gap: 16px; padding: 20px 20px 18px; border-bottom: 1px solid var(--line); }
.detail-head h2 { font-size: 20px; display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.badge {
    display: inline-flex; align-items: center; font-size: 11px; font-weight: 700;
    padding: 4px 8px; border: 1px solid var(--line); border-radius: 4px;
}
.meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; margin: 0; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; }

.nr-edit { width: 150px; font-size: 11px; }
.nr-edit label { margin: 0 0 6px; font-size: 11px; font-weight: 400; color: var(--muted); }
.nr-inputs { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.nr-inputs input { padding: 6px 8px; font-size: 12px; }
.nr-edit .btn { width: 100%; }

.tabs { display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a {
    padding: 13px 12px; font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap;
    border-bottom: 2px solid transparent;
}
.tabs a.active { color: var(--red); border-bottom-color: var(--red); }

.tab-body { padding: 18px; }
.tab-body h3 { font-size: 15px; margin: 20px 0 12px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--radius); }
.facts > div { padding: 14px 16px; border-right: 1px solid var(--line); }
.facts > div:last-child { border-right: 0; }
.facts label { margin: 0 0 6px; font-size: 11px; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.facts b { display: block; margin-bottom: 4px; }
.facts span { color: var(--muted); }
.info-box { background: #f4f5f7; border-left: 4px solid var(--red); padding: 16px; }

/* ---------- Benutzerverwaltung ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th {
    text-align: left; padding: 10px 14px; background: #f7f8fa; border-bottom: 1px solid var(--line);
    font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table .actions { text-align: right; white-space: nowrap; }
form.inline { display: inline; margin-left: 4px; }
.pill { display: inline-block; padding: 3px 8px; border-radius: 10px; font-size: 11px; font-weight: 700; }
.pill-active { background: #edf8f0; color: #17692f; }
.pill-pending { background: #fff5e0; color: #8a5a00; }
.pill-warn { background: var(--red-soft); color: var(--red-dark); }
.pill-disabled { background: #f1f2f4; color: var(--muted); }

.section-title { font-size: 15px; margin: 8px 0 10px; display: flex; align-items: center; gap: 8px; }
.section-title .count { background: var(--red); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.section-gap { margin-bottom: 24px; }
.table tr.inactive td { opacity: .5; }
.table td input { padding: 6px 8px; }

/* ---------- Bearbeiten-Formulare ---------- */
.edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; margin-bottom: 12px; }
.pad { padding: 20px; }
.pad h3, .pad-head { font-size: 15px; margin: 0 0 14px; }
.pad-head { padding: 16px 14px 0; }
.check { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; font-size: 14px; }
.check input { width: auto; margin: 0; }
.check-list, .radio-group { display: grid; gap: 8px; }
.form-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.page-head a:not(.btn), .pad a:not(.btn), .pad-x a { color: var(--red); text-decoration: none; }

/* ---------- Menü: Abschnitt & Tooltip ---------- */
.nav-section {
    margin: 14px 0 4px; padding: 10px 22px 4px; border-top: 1px solid rgba(255, 255, 255, .08);
    font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8a8f98; white-space: nowrap;
}
.nav-tip {
    position: fixed; z-index: 100; max-width: 260px; padding: 9px 12px; border-radius: var(--radius);
    background: var(--ink); color: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
    transform: translateY(-50%); opacity: 0; pointer-events: none; transition: opacity .12s;
}
.nav-tip.show { opacity: 1; }
.nav-tip b { display: block; font-size: 13px; }
.nav-tip span { display: block; margin-top: 3px; font-size: 12px; color: #c9cdd3; line-height: 1.4; }
.nav-tip span:empty { display: none; }
.nav-tip::before {
    content: ""; position: absolute; left: -5px; top: 50%; margin-top: -5px;
    border: 5px solid transparent; border-left: 0; border-right-color: var(--ink);
}

/* ---------- Rechtestufen ---------- */
.lvl { display: inline-block; padding: 3px 8px; border-radius: 10px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.lvl-0 { background: #f1f2f4; color: var(--muted); }
.lvl-1 { background: #e8f1fd; color: #1d4f91; }
.lvl-2 { background: #edf8f0; color: #17692f; }
.lvl-3 { background: #fff5e0; color: #8a5a00; }
.lvl-4 { background: var(--red-soft); color: var(--red-dark); }

.inline-icon { display: inline-flex; vertical-align: middle; color: var(--muted); }
.pad-x { padding: 0 14px; margin: -6px 0 12px; }
.pad-x.pad-top { margin-top: 0; padding-top: 14px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: #f1f2f4; padding: 1px 5px; border-radius: 4px; }

.icon-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-picker label { margin: 0; cursor: pointer; }
.icon-picker input { position: absolute; opacity: 0; }
.icon-picker span {
    display: flex; align-items: center; justify-content: center; width: 40px; height: 40px;
    border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink);
}
.icon-picker input:checked + span { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.icon-picker input:focus-visible + span { outline: 2px solid rgba(200, 16, 46, .35); }

/* ---------- Mehrfachauswahl als Chips ---------- */
.check-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.check-fieldset legend { display: block; padding: 0; margin: 16px 0 6px; font-size: 12px; font-weight: 700; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { margin: 0; font-weight: 400; cursor: pointer; }
.chip[hidden] { display: none; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
    display: inline-block; padding: 6px 10px; border: 1px solid #cfd4da; border-radius: 16px;
    font-size: 13px; background: #fff; user-select: none;
}
.chip-sm span { padding: 3px 8px; font-size: 12px; }
.chip input:checked + span { border-color: var(--red); background: var(--red-soft); color: var(--red-dark); font-weight: 700; }
.chip input:focus-visible + span { outline: 2px solid rgba(200, 16, 46, .35); }
.wehr-row:not(.is-member) .chip-list { opacity: .55; }

/* ---------- Wehr-Karten beim Benutzer ---------- */
.wehr-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-top: 12px; background: #fafbfc; }
.wehr-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.wehr-card-head b { font-size: 15px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag {
    display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 14px;
    background: var(--red-soft); color: var(--red-dark); border: 1px solid #f3c4cb; font-size: 12px; font-weight: 700;
}
.tag form.inline { margin: 0; }
.tag-x {
    width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: transparent;
    color: var(--red-dark); font-size: 14px; line-height: 18px; cursor: pointer;
}
.tag-x:hover { background: rgba(200, 16, 46, .15); }
.inline-add { display: flex; gap: 8px; align-items: center; }
.inline-add select { padding: 6px 8px; font-size: 13px; }
.inline-add .btn { flex-shrink: 0; }
.add-wehr { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.empty-inline { margin: 12px 0 0; color: var(--muted); font-size: 13px; }

/* ---------- Admin-Ansicht (Umschalter + orange Kopfzeile) ---------- */
.admin-view-form { margin: 0 auto 0 0; }
.admin-switch {
    display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 6px;
    border: 1px solid var(--line); border-radius: 22px; background: #fff; font: inherit; color: var(--ink); cursor: pointer;
}
.admin-switch:hover { border-color: var(--ink); }
.switch-track { position: relative; width: 36px; height: 20px; border-radius: 10px; background: #cfd4da; transition: background .15s; flex-shrink: 0; }
.switch-thumb {
    position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: left .15s;
}
.admin-switch[aria-checked="true"] .switch-track { background: #e8710a; }
.admin-switch[aria-checked="true"] .switch-thumb { left: 18px; }
.switch-label { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; text-align: left; }
.switch-label b { font-size: 12px; }
.switch-label small { font-size: 11px; }

.admin-view .topbar, .admin-view .sidebar-head { background: #ffe3c2; border-bottom-color: #f5b577; }
.admin-view .admin-switch { border-color: #f5b577; }

/* ---------- Reiter (allgemein) ---------- */
.tab-box { margin-bottom: 16px; }
.tab-box > .tabs { padding: 0 8px; background: #fff; border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; }
.tabs button {
    padding: 13px 12px; font: inherit; font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer;
    background: none; border: 0; border-bottom: 2px solid transparent; color: var(--ink);
}
.tabs button.active { color: var(--red); border-bottom-color: var(--red); }
.tabs .tab-count { margin-left: 6px; padding: 1px 7px; border-radius: 10px; background: #f1f2f4; color: var(--muted); font-size: 11px; }
.tab-box > [data-tab-panel] { border-radius: 0 0 var(--radius) var(--radius); }

.person-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.person-grid label:first-child { margin-top: 0; }
.wehr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.wehr-cards .wehr-card { margin-top: 0; }

.tag-warn { background: #fff5e0; color: #8a5a00; border-color: #f5d49a; }
.tag-warn .tag-x { color: #8a5a00; }
.tag .tag-count { font-weight: 400; opacity: .75; }
.row-link { font-weight: 700; text-decoration: none; color: var(--ink); }
.row-link:hover { color: var(--red); }
.wehr-form { display: grid; grid-template-columns: 2fr 120px auto auto; gap: 16px; align-items: end; }
.wehr-form label { margin-top: 0; }
.inline-add input[type=text] { padding: 6px 8px; font-size: 13px; }

/* ---------- Ungespeicherte Änderungen, Auswahl, Sofort-Speichern ---------- */
.table tr.is-dirty td { background: #fff8d6; }
.table tr.is-dirty .btn-save { background: #f5c518; border-color: #d9a900; color: var(--ink); }
.table input.is-changed { border-color: #d9a900; background: #fffbe8; }
.dirty-sample { background: #fff8d6; padding: 0 4px; border-radius: 3px; }
.table tr.is-selected td { background: #f3f6fb; }
.table tr.is-selected.is-dirty td { background: #fff8d6; }
.bulk-bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 10px 14px; background: #f3f6fb; border-bottom: 1px solid var(--line);
}
.bulk-bar[hidden] { display: none; }
.bulk-bar select { width: auto; min-width: 220px; padding: 6px 8px; font-size: 13px; }
.save-state { display: block; font-size: 11px; color: var(--muted); min-height: 14px; }
.save-state.ok { color: #17692f; }
.save-state.err { color: var(--red-dark); }

/* ---------- Sofort-Suche ---------- */
.list-search { position: relative; display: flex; align-items: center; margin-bottom: 12px; }
.list-search .icon { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.list-search input { padding-left: 36px; padding-right: 110px; }
.list-search .filter-count { position: absolute; right: 40px; font-size: 12px; color: var(--muted); }
.list-search kbd {
    position: absolute; right: 10px; padding: 1px 6px; border: 1px solid var(--line); border-radius: 4px;
    font: 11px ui-monospace, Menlo, monospace; color: var(--muted); background: #f7f8fa;
}
.panel > .list-search { margin: 0; padding: 12px; border-bottom: 1px solid var(--line); }
.panel > .list-search .icon { left: 24px; }
.panel > .list-search .filter-count { right: 52px; }
.panel > .list-search kbd { right: 22px; }
.table tr[hidden] { display: none !important; } /* auch in der Kartenansicht am Handy (.karten-tabelle tr { display: flex/grid }) – sonst greift die Suche dort nicht */

/* ---------- Dialog (Rückfragen) ---------- */
dialog.modal {
    width: min(460px, calc(100vw - 32px)); padding: 24px; border: 0; border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
}
dialog.modal::backdrop { background: rgba(20, 24, 30, .45); }
dialog.modal h3 { margin: 0 0 6px; font-size: 18px; }
dialog.modal p { margin: 0 0 16px; font-size: 15px; font-weight: 700; color: var(--ink); }
.modal-actions { display: flex; flex-direction: column; gap: 8px; }
.modal-actions .btn { width: 100%; }
.tb-fb-note { margin-top: 14px; }

/* ---------- Modul Telefonbuch ---------- */
.tb-search { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.tb-search .list-search { flex: 1; margin: 0; }
.tb-search .list-search input { padding-right: 80px; }
.tb-search .filter-count { right: 12px; }
.tb-search-hint { margin: -4px 0 10px; }
.tb-search-hint code { font-size: 11px; }
.tb-tagbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; }
.tb-tag {
    --tag: #6b7280;
    display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 12px; font-size: 12px; font-weight: 700;
    background: color-mix(in srgb, var(--tag) 14%, #fff); color: color-mix(in srgb, var(--tag) 70%, #000);
    border: 1px solid color-mix(in srgb, var(--tag) 40%, #fff); white-space: nowrap;
}
.tb-tag form.inline { margin: 0; }
.tb-tag .tag-x { color: inherit; }
.tb-tag-link { text-decoration: none; opacity: .75; }
.tb-tag-link:hover, .tb-tag-link.active { opacity: 1; }
.tb-tag-link.active .tb-tag { box-shadow: 0 0 0 2px var(--tag); }
.tb-channels {
    display: flex; flex-wrap: wrap; gap: 16px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #f7f8fa;
}
.tb-channels label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; }
.tb-channels select { width: auto; padding: 5px 8px; font-size: 12px; }

.tb-call {
    display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: var(--radius);
    background: #edf8f0; border: 1px solid #bfe5c9; color: #17692f; font-weight: 700; text-decoration: none;
    font-variant-numeric: tabular-nums; white-space: nowrap;
}
.tb-call:hover { background: #d9f1e0; border-color: #17692f; }
.tb-call.compact { padding: 3px 8px; font-size: 13px; gap: 6px; }
.tb-call.compact .icon { width: 14px; height: 14px; }
.tb-mail { background: #e8f1fd; border-color: #bcd4f6; color: #1d4f91; }
.tb-mail:hover { background: #d6e6fb; border-color: #1d4f91; }
.tb-mail span { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.tb-cell-actions > div { margin-bottom: 4px; }
.tb-row-pflege td:first-child { box-shadow: inset 3px 0 0 var(--red); }

.tb-item {
    display: flex; justify-content: space-between; gap: 16px; align-items: flex-start;
    padding: 12px 14px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
.tb-item.is-pflege { border-color: #f3c4cb; background: #fffafa; }
.tb-item.is-archived { opacity: .65; background: #f7f8fa; }
.tb-item-main { min-width: 0; }
.tb-item-info { margin-top: 8px; font-size: 13px; }
.tb-meta { margin-top: 6px; font-size: 11px; color: var(--muted); }
.tb-item-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: flex-start; }
.tb-edit, .tb-add, .tb-pflege-melden { display: inline-block; }
.tb-edit summary, .tb-add summary, .tb-pflege-melden summary { list-style: none; cursor: pointer; }
.tb-edit summary::-webkit-details-marker, .tb-add summary::-webkit-details-marker, .tb-pflege-melden summary::-webkit-details-marker { display: none; }
.tb-edit[open] { flex-basis: 100%; }
.tb-sub-form {
    display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px;
    margin-top: 10px; padding: 12px; background: #f7f8fa; border-radius: var(--radius); min-width: 420px;
}
/* je Zeile: Beschriftung links (150px), Feld rechts – Hinweise (small) und Pflicht-Stern stehen in der Beschriftung */
.tb-sub-form label { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 12px; margin: 0; font-size: 12px; font-weight: 700; }
.tb-sub-form label > span small { font-weight: 400; color: var(--muted, #6b7280); }
.tb-sub-form label.check { display: flex; align-items: center; gap: 6px; padding-left: 162px; font-weight: 400; }
.tb-sub-form input, .tb-sub-form select { width: 100%; min-width: 0; padding: 6px 8px; font-size: 13px; }
.tb-sub-form label.check input { width: auto; }
.tb-sub-form .btn { justify-self: start; margin-left: 162px; }
/* IDECS-Taste: Felder nebeneinander, Beschriftung über dem Feld */
.tb-sub-form.idecs-form { display: flex; }
.tb-sub-form.idecs-form label { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.tb-sub-form.idecs-form label.check { flex-direction: row; align-items: center; padding-left: 0; }
.tb-sub-form.idecs-form .btn { margin-left: 0; }
.tb-add { margin: 4px 0 8px; }
.tb-add[open] { display: block; }
.tb-add[open] .tb-sub-form { max-width: 640px; }
.tb-section { margin-top: 24px !important; }
.tb-archiv { margin-top: 20px; }
.tb-archiv summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.tb-pflege-melden { margin-top: 14px; }
.tb-pflege-melden[open] { display: block; }
.tb-pflege-melden .inline-add { margin-top: 8px; }
.tb-archive-form { margin-top: 10px; }
.tb-notiz { margin-top: 12px; padding: 10px 12px; font-size: 13px; }
.tb-diff { margin: 4px 0 0; padding-left: 18px; font-size: 12px; }
.tb-diff del { color: var(--red-dark); }
.tb-diff ins { color: #17692f; text-decoration: none; font-weight: 700; }
.tb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.tb-grid > [hidden] { display: none; }
.tb-plz-ort { display: grid; grid-template-columns: 120px 1fr; gap: 0 12px; }
.tb-typ { display: flex; gap: 24px; margin-bottom: 4px; }
.tb-color { width: 44px; height: 32px; padding: 2px; border: 1px solid #cfd4da; border-radius: var(--radius); background: #fff; }

/* Telefonbuch: Liste oben ausrichten, bevorzugte Nummer, Export-Menü */
.tb-list td { vertical-align: top; }
.tb-list .tb-wahl { width: 34px; text-align: center; }
.tb-list .tb-wahl input { width: 18px; height: 18px; margin: 0; cursor: pointer; }
.tb-sammel-leiste { position: sticky; top: var(--topbar-h); z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
    margin: 10px 16px; padding: 8px 12px; background: var(--red-soft); border: 1px solid #f3c4cb; border-radius: var(--radius); }
.tb-sammel-leiste[hidden] { display: none; }
.tb-sammel-leiste b { color: var(--red-dark); }
.tb-sammel-gruppe { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tb-sammel-gruppe label { margin: 0; font-weight: 600; font-size: 13px; }
.tb-sammel-gruppe select { padding: 5px 8px; font-size: 13px; max-width: 220px; }
.tb-sammel-hinweis { margin: 8px 0 0; }
.tb-mandant-pill { font-size: 11px; }
.tb-mandanten { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.tb-mandanten legend { padding: 0 4px; font-weight: 600; }
.tb-mandanten .field-hint { flex-basis: 100%; }
.tb-star { color: #d9a900; font-size: 13px; line-height: 1; margin-left: -2px; }
.tb-call.is-pref { box-shadow: 0 0 0 1px #17692f inset; }
.tb-mail.is-pref { box-shadow: 0 0 0 1px #1d4f91 inset; }
.menu { position: relative; display: inline-block; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu-list {
    position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 280px; padding: 6px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(0, 0, 0, .12);
}
.menu .menu-list a { display: block; padding: 8px 10px; border-radius: 4px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 13px; }
.menu .menu-list a:hover { background: #f3f6fb; color: var(--red); }
.menu-hint { padding: 4px 10px 6px; font-size: 11px; color: var(--muted); }

/* Telefonbuch: Typ-Filter und Typ-Kennzeichnung */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; }
.seg a { padding: 3px 10px; font-size: 12px; font-weight: 700; text-decoration: none; color: var(--muted); border-left: 1px solid var(--line); }
.seg a:first-child { border-left: 0; }
.seg a:hover { color: var(--ink); background: #f7f8fa; }
.seg a.active { background: var(--ink); color: #fff; }
.tb-tagbar-sep { margin-left: 10px; }
.pill-typ-organisation { background: #e8f1fd; color: #1d4f91; margin-left: 4px; }
.pill-typ-objekt { background: #f1e8fd; color: #5b2a91; margin-left: 4px; }
.tb-objekt-feld { grid-column: 1 / -1; }

/* ---------- Code/XML-Anzeige, Postfach ---------- */
.code-block {
    margin: 0; padding: 14px; max-height: 70vh; overflow: auto; background: #1f2124; color: #e6e7e9;
    font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-word;
    border-radius: 0 0 var(--radius) var(--radius);
}
.pad .code-block, section.pad > .code-block { border-radius: var(--radius); }
.pad-x.pad-top + .code-block { margin-top: 12px; }
.mail-unseen td { font-weight: 700; }
.mail-box > summary { list-style: none; cursor: pointer; }
.mail-box > summary::-webkit-details-marker { display: none; }
.mail-box-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.mail-box-head .btn { margin-left: auto; }
.mail-box:not([open]) .mail-box-head { border-bottom: 0; }
.mail-box-head::before { content: "▸"; color: var(--muted); transition: transform .15s; }
.mail-box[open] .mail-box-head::before { transform: rotate(90deg); }
.mail-box .mail-fehler { margin: 12px; }

/* ---------- Einsätze ---------- */
.list-filter { padding: 0 12px 10px; }
.list-lock { font-size: 13px; margin-left: 4px; }
.list-ort { display: block; margin-top: 2px; color: var(--muted); }
.list-item .dot { vertical-align: middle; margin-left: 4px; }
.badge-done { color: var(--muted); font-weight: 400; }
.detail-panel .tabs button { padding: 13px 10px; font-size: 12px; }
.detail-panel .info-box { margin-bottom: 8px; }
.log-table td { vertical-align: top; }
.log-details { margin-top: 3px; font-size: 12px; color: var(--muted); white-space: pre-line; }

/* Einsatz: Druckmenü + Nummer rechts im Kopf; Hinweis nach Hintergrund-Import */
.detail-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.toast {
    position: fixed; right: 20px; bottom: 20px; z-index: 50; display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; background: var(--ink); color: #fff; border-radius: var(--radius); box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
}
.toast[hidden] { display: none; }
.toast-x { background: none; border: 0; color: #fff; font-size: 18px; cursor: pointer; padding: 0 4px; }

/* Einsatz: Objekt aus dem Telefonbuch */
.objekt-karte + .objekt-karte { border-top: 1px solid var(--line); }
.objekt-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.objekt-kopf h3 { margin: 0 0 4px; font-size: 16px; }
.objekt-kopf p { margin: 0 0 6px; }
.objekt-karte h4 { margin: 16px 0 8px; font-size: 13px; }
.objekt-nummern > div { margin-bottom: 6px; }
.tab-count.tab-warn { background: #fff5e0; color: #8a5a00; }

/* Einsatzübersicht (breite Bildschirme): Seite füllt das Fenster, Kopfdaten bleiben stehen.
   Links scrollt nur die Einsatzliste, rechts nur der Inhalt des gewählten Reiters. */
@media (min-width: 1001px) {
    .content:has(> .split) { display: flex; flex-direction: column; overflow: hidden; }
    .content:has(> .split) > * { flex-shrink: 0; }
    .content:has(> .split) > .split { flex: 1 1 auto; min-height: 0; flex-shrink: 1; }
    .split .list-panel, .split .detail-panel { display: flex; flex-direction: column; min-height: 0; }
    .list-panel > .search, .list-panel > .list-filter, .list-panel > .list-head { flex-shrink: 0; }
    .list-scroll { flex: 1; min-height: 0; overflow-y: auto; }
    .detail-panel > .detail-head { flex-shrink: 0; }
    .detail-tabs { flex: 1; min-height: 0; display: flex; flex-direction: column; }
    .detail-tabs > .tabs { flex-shrink: 0; }
    .detail-tabs > [data-tab-panel] { flex: 1; min-height: 0; overflow-y: auto; }
    .detail-tabs > [data-tab-panel] thead th { position: sticky; top: 0; z-index: 1; }
    .mail-box #mail-box-inhalt { max-height: 32vh; overflow-y: auto; }
}

/* Anklickbare Schildchen ohne Unterstreichung */
a.pill { text-decoration: none; }
a.pill-link:hover { filter: brightness(.95); box-shadow: 0 0 0 1px currentColor inset; }

/* Fahrzeuge */
.fz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
/* Sonderbeladung: feste Spaltenbreiten, Menge + Einheit nebeneinander */
.fz-beladung { table-layout: fixed; }
.fz-beladung .sp-bez { width: 20%; } .fz-beladung .sp-beschr { width: 22%; } .fz-beladung .sp-menge { width: 210px; }
.fz-beladung .sp-bem { width: 18%; } .fz-beladung .sp-notiz { width: 16%; } .fz-beladung .sp-akt { width: 190px; }
.fz-beladung td { vertical-align: middle; }
.fz-beladung td input { width: 100%; min-width: 0; padding: 7px 9px; font-size: 13px; }
.fz-menge { display: flex; gap: 6px; }
.fz-menge input[name="anzahl"] { flex: 0 0 82px; }
.fz-menge input[name="einheit"] { flex: 1 1 auto; }
.fz-beladung .actions { white-space: nowrap; }
.fz-beladung-neu td { background: #fafbfc; }
@media (max-width: 1000px) { .fz-beladung { table-layout: auto; } }
.fz-span2 { grid-column: 1 / -1; }
.fz-funkruf { margin-top: 8px; font-size: 13px; color: var(--muted); }
.fz-besatzung { border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 12px 12px; margin: 16px 0 0;
                display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.fz-besatzung legend { font-size: 12px; font-weight: 700; padding: 0 4px; }
.fz-besatzung label { margin: 0; font-weight: 400; }
.fz-besatzung input { margin-top: 4px; }

/* Anwesenheit im Einsatz */
.anw-kopf-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-bottom: 8px; }
.anw-table td input, .anw-table td select { padding: 5px 6px; font-size: 13px; }
.anw-summe td { background: #f7f8fa; }
.anw-kopf summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.anw-kopf-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin-top: 10px; max-width: 760px; }
.anw-kopf-form label { margin: 0; }
.anw-kopf-form .anw-titel { grid-column: 1 / -1; }

/* Einsatz: Quelle, FEZ besetzt, Einsatzmittel bearbeiten */
.pill-quelle-xml { background: #e8f1fd; color: #1d4f91; margin-left: 4px; font-size: 10px; }
.pill-quelle-manuell { background: #fff5e0; color: #8a5a00; margin-left: 4px; font-size: 10px; }
.fez-besetzt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.fez-besetzt input { width: auto; padding: 4px 6px; font-size: 13px; }
.em-edit td input { padding: 4px 6px; font-size: 12px; min-width: 0; }
.em-edit td:first-child input { min-width: 170px; margin-bottom: 4px; }

/* Einsatz abschließen */
.wehr-form-voll { grid-column: 1 / -1; }
.wehr-schalter { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.empf-block > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.empf-block > summary::-webkit-details-marker { display: none; }
.empf-block[data-inaktiv] > summary { opacity: .6; }
.empf-test { margin-left: auto; }
.monitor-form { margin-top: 14px; }
.empf-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.empf-form label { margin: 0; }
.empf-form .span2 { grid-column: 1 / -1; }
.empf-form [hidden] { display: none; }
.empf-modi { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 8px; }
.empf-modi label { margin: 0; }
.empf-wehren { margin-top: 4px; }
.empf-form [data-label-fest][hidden], .empf-form [data-label-zusatz][hidden] { display: none; }
.empf-flags { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.empf-flags label { display: flex; align-items: center; gap: 6px; }
.detail-panel > .lock-banner { flex-shrink: 0; }
.lock-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; background: #f1f2f4; border-bottom: 1px solid var(--line); font-size: 13px; }
.lock-banner.mon-zurueck { flex-wrap: wrap; justify-content: flex-start; background: #eaf2ff; } .lock-banner.mon-zurueck > span { flex: 1 1 320px; } .lock-banner.mon-zurueck select { width: auto; padding: 3px 6px; }
.pill-lock { background: #1f2124; color: #fff; margin-left: 4px; font-size: 10px; }
.checkliste { list-style: none; padding: 0; margin: 0 0 6px; }
.checkliste li { padding: 5px 0; font-size: 14px; }
.checkliste li.ok { color: #17692f; }
.checkliste li.offen { color: #8a5a00; }
.empf-karte { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; }
.empf-karte > label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.empf-karte details summary { cursor: pointer; font-size: 12px; color: var(--muted); margin-top: 6px; }
.mail-vorschau { white-space: pre-wrap; margin-top: 8px; padding: 10px 12px; background: #f7f8fa; border-radius: var(--radius); font-size: 13px; }

/* Symbol je Wehr */
.icon-wahl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.icon-feld { width: 64px !important; text-align: center; font-size: 20px; padding: 4px !important; }
.icon-knopf { width: 38px; height: 38px; font-size: 20px; line-height: 1; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; }
.icon-knopf:hover { border-color: var(--ink); }
.wehr-icon { font-size: 16px; }

/* Einsatz: Reiter „Infos“ */
.infos-meta { grid-template-columns: 170px 1fr; margin-bottom: 6px; }
.infos-meta dd { display: flex; align-items: center; min-height: 28px; }
.infos-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 22px 0 8px; }
.infos-kopf h3 { margin: 0; }
.infos-kopf label { margin: 0 0 0 auto; }
.infos-label { width: 240px; color: var(--muted); }
.infos-table tr[hidden] { display: none; }

/* ---------- Übersicht ---------- */
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; align-items: start; }
.kachel { padding: 16px 18px; }
.kachel.dashboard-empty { min-height: 200px; }
.kachel-kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.kachel-kopf h3 { margin: 0; font-size: 15px; }

/* Wetter-Kachel */
.wetter-jetzt { display: grid; grid-template-columns: auto auto 1fr; gap: 14px; align-items: center; }
.wetter-symbol { font-size: 48px; line-height: 1; }
.wetter-temp { font-size: 30px; font-weight: 700; line-height: 1.1; }
.wetter-text { color: var(--muted); }
.wetter-wind { justify-self: end; text-align: right; font-size: 14px; }
.wind-pfeil { display: inline-block; font-size: 20px; color: var(--red); margin-right: 4px; transition: transform .3s; }
.wetter-details { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 10px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.wetter-details dt { font-size: 11px; color: var(--muted); }
.wetter-details dd { margin: 2px 0 0; font-weight: 700; }
.wetter-warnungen { display: grid; gap: 6px; margin-bottom: 10px; }
.wetter-keine { color: #17692f; font-size: 13px; }
.wetter-warnung { border-radius: var(--radius); padding: 8px 10px; border-left: 4px solid; }
.wetter-warnung summary { cursor: pointer; list-style: none; display: flex; flex-direction: column; }
.wetter-warnung summary::-webkit-details-marker { display: none; }
.wetter-warnung p { margin: 6px 0 0; font-size: 13px; }
.warn-wetter   { background: #fffbe6; border-color: #f5d000; }
.warn-markant  { background: #fff3e0; border-color: #f57c00; }
.warn-unwetter { background: #fdecea; border-color: #d32f2f; }
.warn-extrem   { background: #f3e5f5; border-color: #8e24aa; }
.wetter-stunden { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.wetter-stunde { flex: 0 0 auto; min-width: 74px; display: flex; flex-direction: column; align-items: center; gap: 2px;
                 padding: 8px 6px; background: #f7f8fa; border-radius: var(--radius); font-size: 12px; text-align: center; }
.wetter-stunde-symbol { font-size: 22px; }
.wetter-fuss { margin: 8px 0 0; }
@media (max-width: 600px) {
    .kacheln { grid-template-columns: 1fr; }
    .wetter-details { grid-template-columns: repeat(2, 1fr); }
    .wetter-jetzt { grid-template-columns: auto 1fr; }
    .wetter-wind { grid-column: 1 / -1; justify-self: start; text-align: left; }
}
.dashboard-empty {
    min-height: calc(100vh - 200px); display: flex; align-items: center; justify-content: center;
    border-style: dashed; color: var(--muted);
}

/* ---------- Responsiv ---------- */
@media (max-width: 1000px) {
    .split { grid-template-columns: 1fr; }
    .list-panel { border-right: 1px solid var(--line); border-bottom: 0; }
    .topbar .status { display: none; }
}
@media (max-width: 700px) {
    /* Handy: Kopfzeile oben mit Menü-Knopf; das Menü fährt in voller Höhe von links herein */
    .app-body { flex-direction: column; height: auto; min-height: 100vh; overflow: visible; }
    .app-main { height: auto; min-height: 100vh; }
    .content { overflow: visible; }
    .topbar { position: sticky; top: 0; }
    .sidebar { position: fixed; top: 0; left: 0; bottom: 0; z-index: 60; width: min(300px, 86vw); height: 100vh; height: 100dvh;
               transform: translateX(-102%); transition: transform .22s ease; overflow-y: auto; box-shadow: 4px 0 24px rgba(0, 0, 0, .25); }
    .menu-offen .sidebar { transform: none; }
    .menu-backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .45); }
    .menu-offen .menu-backdrop { display: block; }
    .menu-offen, .menu-offen body { overflow: hidden; }
    .sidebar nav { display: block; }
    .sidebar nav a { padding: 15px 20px; font-size: 15px; }
    .sidebar-head { position: sticky; top: 0; z-index: 1; }
    .nav-tip { display: none; }
    .menu-knopf { display: inline-flex; }
    .topbar { gap: 14px; padding: 0 16px; }
    .topbar .clock, .topbar .user { display: none; }
    .topbar-logo img { height: 32px; }
    .content { padding: 16px; }
    .page-head { flex-direction: column; }
    .detail-head { flex-direction: column; }
    .facts { grid-template-columns: 1fr; }
    .edit-grid, .person-grid, .wehr-form, .tb-grid, .fz-grid, .fz-besatzung { grid-template-columns: 1fr; }
    .tb-item { flex-direction: column; }
    .tb-sub-form { min-width: 0; }
    .tb-sub-form label { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .tb-sub-form label.check { padding-left: 0; }
    .tb-sub-form .btn { margin-left: 0; }
    .tb-search { flex-direction: column; align-items: stretch; }
    .switch-label small { display: none; }
    .facts > div { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Bildschirmverwaltung ---------- */
.ticker-pop { min-width: 460px; padding: 14px; text-align: left; }
.monitor-link { display: flex; gap: 8px; align-items: center; }
.monitor-link input { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.freigabecode { font-size: 34px; font-weight: 800; letter-spacing: .3em; font-variant-numeric: tabular-nums; }

/* Stichwort-Suche (Einsatz manuell anlegen) */
.sw-suche { position: relative; }
.sw-liste { position: absolute; left: 0; right: 0; top: 64px; z-index: 30; max-height: 320px; overflow-y: auto; margin: 0; padding: 4px;
    list-style: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(0, 0, 0, .12); }
.sw-liste li { display: flex; gap: 12px; padding: 7px 10px; border-radius: 4px; cursor: pointer; font-size: 13px; }
.sw-liste li b { min-width: 64px; color: var(--red-dark); }
.sw-liste li.aktiv, .sw-liste li:hover { background: #f3f6fb; }
.sw-liste li.sw-leer { color: var(--muted); cursor: default; }

/* Arbeitsplatz-Zuweisung (Einsatzliste, Übersicht) */
.pill-ap { display: inline-block; margin-top: 3px; background: #e8f1fd; color: #1d4f91; font-size: 10px; }
.pill-ap-alle { background: #f1f2f4; color: var(--muted); }
.kachel-einsaetze .ae-karte { padding: 10px 0; border-top: 1px solid var(--line); }
.kachel-einsaetze .ae-kopf { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; color: inherit; text-decoration: none; }
.kachel-einsaetze .ae-kopf:hover b { text-decoration: underline; }
.kachel-einsaetze .ae-kopf small { margin-left: auto; color: var(--muted); }
.kachel-einsaetze .ae-ap { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.ap-liste { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 3px; }
.ap-liste .pill-ap { margin-top: 0; }

/* Testeinsätze / Übungen */
.pill-test { background: #6b2fb3; color: #fff; margin-left: 4px; font-size: 10px; letter-spacing: .05em; }
.btn-test { border-color: #6b2fb3; color: #6b2fb3; }
.test-wahl.ist-test { border: 2px solid #6b2fb3; background: #f6f0fd; }

/* Untereinsätze / Einsatzstellen */
.pill-unter { background: #fff0d6; color: #8a5a00; margin-left: 4px; font-size: 10px; text-decoration: none; }
.list-unter { display: block; color: #8a5a00; }
.ap-wahl { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }

/* Geparkte Einsätze (abgearbeitet – wartet auf Sichtung) */
.pill-geparkt { background: #fff1c2; color: #7a5b00; margin-left: 4px; font-size: 10px; }
.btn-parken { border-color: #c99a00; color: #7a5b00; }
.btn-vg-ende { background: #1f7a3d; border-color: #1f7a3d; color: #fff; }
.btn-vg-ende:hover { background: #17612f; }
.pill-vg-ende { background: #dff3e5; color: #1f6b38; margin-left: 4px; font-size: 10px; }
.vg-info { color: #1f6b38; }
.erneut-box { margin: 12px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.erneut-box summary { cursor: pointer; }
.erneut-box form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.erneut-feld { display: flex; flex-direction: column; gap: 4px; }
.park-info { padding: 8px 10px; border-radius: var(--radius); background: #fff8e0; border: 1px solid #f0d98a; font-size: 12px; display: flex; flex-direction: column; gap: 6px; }

/* Startseite: Einsatzmittel und Parken */
.kachel-einsaetze .ae-mittel { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.ae-fz { padding: 2px 6px; border-radius: 4px; background: #f1f2f4; border-left: 3px solid var(--muted); font-size: 11px; }
.ae-fz small { color: var(--muted); }
.ae-fz.fzst { border-color: var(--st, #9aa4b2); } .ae-fz.st-ende { opacity: .55; } /* Farben zentral: Admin › Fahrzeugstatus */
.kachel-einsaetze .ae-aktionen { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }

/* Startseite: „Aktive Einsätze“ über die ganze Breite, je Einsatz eine Zeile mit festen Spalten:
   Einsatz · Arbeitsplätze · Fahrzeuge · Infotext · Bemerkung Einsatzanlass · Bearbeitung (Parken/Sichten) */
.kacheln > .kachel-einsaetze { grid-column: 1 / -1; order: -1; }
.kachel-einsaetze .ae-zeile { display: grid; grid-template-columns: minmax(220px, 1.2fr) minmax(300px, 1.3fr) minmax(200px, 1.2fr) minmax(160px, 1fr) minmax(160px, 1fr) minmax(170px, .9fr);
    gap: 16px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.kachel-einsaetze .ae-titel { padding: 4px 0; border-top: 0; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.kachel-einsaetze .ae-zeile.ist-geparkt { background: #fffbea; }
.kachel-einsaetze .ae-einsatz { display: flex; flex-direction: column; gap: 2px; }
.kachel-einsaetze .ae-kopf { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; color: inherit; text-decoration: none; }
.kachel-einsaetze .ae-kopf:hover b { text-decoration: underline; }
.kachel-einsaetze .ae-ap { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; }
.kachel-einsaetze .ae-mittel { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 0; }
.kachel-einsaetze .ae-text { color: var(--ink); line-height: 1.4; overflow-wrap: anywhere; }
.kachel-einsaetze .ae-aktionen { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 0; }
@media (max-width: 1200px) {
    .kachel-einsaetze .ae-titel { display: none; }
    .kachel-einsaetze .ae-zeile { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
    .kachel-einsaetze .ae-zeile { grid-template-columns: 1fr; }
}

/* Zeitfeld mit 🕒 „jetzt“ (Einsatzmittel-Status) */
.zeit-jetzt { display: inline-flex; align-items: center; gap: 4px; }
.btn-jetzt { padding: 4px 6px; border: 1px solid var(--line); border-radius: 4px; background: #fff; cursor: pointer; font-size: 14px; line-height: 1; }
.btn-jetzt:hover { border-color: var(--red); background: var(--red-soft); }

/* Wartet auf Abschlussmeldung der Leitstelle */
.pill-ils { background: #e6effa; color: #1d4f91; margin-left: 4px; font-size: 10px; }
.ils-box { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.em-edit tr.em-xml input[readonly] { background: #f4f5f7; color: var(--muted); border-color: transparent; }

/* Übungsplan */
.dp-form { display: grid; grid-template-columns: 220px 220px 1fr; gap: 12px 16px; align-items: end; }
.dp-form .dp-breit { grid-column: span 1; }
.dp-form .dp-knoepfe { display: flex; gap: 8px; }
.dp-form small { display: block; margin-top: 2px; }
#dp-tabelle tr.dp-heute td { background: #fff8e0; }
@media (max-width: 900px) { .dp-form { grid-template-columns: 1fr; } }
.dp-kat { display: inline-block; padding: 2px 8px; border-radius: 10px; color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; }
.kachel-termine .dp-termin { display: flex; gap: 14px; padding: 8px 0; border-top: 1px solid var(--line); }
.kachel-termine .dp-termin.ist-heute { background: #fff8e0; }
.kachel-termine .dp-datum { flex: 0 0 92px; display: flex; flex-direction: column; }
.kachel-termine .dp-datum small { color: var(--muted); }
.kachel-termine .dp-inhalt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* Stechuhr */
.stechuhr-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.stechuhr-form input[type=text] { flex: 1 1 260px; }
.stechuhr-status { flex: 1 1 100%; font-size: 14px; color: var(--muted); }
.stechuhr-status.an { color: #17692f; }
.kachel-stechuhr.ist-an { border-left: 4px solid #2fb35a; }
.btn-gross { padding: 12px 22px; font-size: 16px; }
.ze-pruefen td { background: #fff8e0; }
.ze-zuordnen { margin-top: 6px; }
.ze-bearbeiten { min-width: 300px; padding: 12px; }
.ze-bearbeiten label { display: block; margin-bottom: 6px; }


/* ---------- Handy: weitere Anpassungen der Seiten ---------- */
@media (max-width: 700px) {
    /* Eingabefelder mit 16px – sonst zoomt iOS beim Antippen hinein */
    input, select, textarea { font-size: 16px; }
    .topbar { justify-content: flex-start; gap: 10px; padding: 0 10px; }
    .topbar .user, .topbar .clock, .topbar .status:not(:has(.dot-red)) { display: none; }
    .admin-switch .switch-label { display: none; }
    .topbar-logo { padding-left: 10px; margin-left: auto; }
    .topbar-logo img { height: 28px; }
    .page-head h1 { font-size: 20px; }
    .page-actions, .inline-add { flex-wrap: wrap; }
    .page-actions .btn, .page-actions select { flex: 1 1 auto; }
    /* Reiter waagerecht wischbar statt umbrechen */
    .tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .tabs button { flex-shrink: 0; white-space: nowrap; }
    .actions { white-space: normal; }
    .actions .btn, .actions form { margin-bottom: 4px; }
    /* Startseite */
    .kacheln { grid-template-columns: 1fr; gap: 12px; }
    .kachel { padding: 14px; }
    .kachel-einsaetze .ae-zeile { gap: 8px; }
    .kachel-einsaetze .ae-text:empty { display: none; }
    .stechuhr-form .btn { flex: 1 1 100%; padding: 14px; font-size: 17px; }
    .stechuhr-form input[type=text] { flex: 1 1 100%; }
    .kachel-termine .dp-datum { flex-basis: 70px; }
    /* Einsätze */
    .list-panel .list-scroll { max-height: 45vh; }
    .detail-side { flex-direction: row; flex-wrap: wrap; }
    .em-edit input[type=datetime-local] { min-width: 180px; }
    .zeit-jetzt .btn-jetzt { padding: 8px 10px; }
    /* Dienstplan / Meine Zeiten */
    .dp-form { grid-template-columns: 1fr; }
    .ze-zuordnen select { max-width: 100%; }
    .ze-bearbeiten { min-width: 0; width: calc(100vw - 40px); }
    .menu-list { max-width: calc(100vw - 24px); }
    /* „Ändern“-Menüs in Tabellen/Karten (Meine Zeiten, Geräte, Aufgaben): Formular unter dem Knopf in voller Breite
       statt schwebend – sonst ragt es links aus dem Bildschirm */
    td .menu { display: block; width: 100%; flex: 1 1 100%; }
    td .menu > summary { display: inline-flex; }
    td .menu[open] > .menu-list { position: static; transform: none; width: 100%; min-width: 0; max-width: none; max-height: none; margin-top: 8px; padding: 12px; box-shadow: none; box-sizing: border-box; }
    /* Bildschirmverwaltung / Mandant */
    .monitor-link { flex-direction: column; align-items: stretch; }
    .ticker-pop { min-width: 0; width: calc(100vw - 40px); }
}

/* ---------- Handy: Startseite – Kacheln untereinander, Stechuhr ganz oben ---------- */
@media (max-width: 700px) {
    .kacheln { display: flex; flex-direction: column; gap: 12px; }
    .kacheln > .kachel { width: 100%; }
    .kacheln > .kachel-stechuhr { order: -3; }
    .kacheln > .kachel-einsaetze { order: -2; }
    .kacheln > .kachel-termine { order: -1; }
    /* aktive Einsätze als Karten */
    .kachel-einsaetze .ae-titel { display: none; }
    .kachel-einsaetze .ae-zeile { grid-template-columns: 1fr; padding: 12px; margin-top: 10px; border: 1px solid var(--line); border-radius: var(--radius); }
    .kachel-einsaetze .ae-zeile.ist-geparkt { border-color: #f0d98a; }
    .kachel-einsaetze .ae-aktionen { flex-direction: row; flex-wrap: wrap; }
    .kachel-einsaetze .ae-mittel { flex-direction: row; flex-wrap: wrap; }
    .kachel-einsaetze .ae-text { font-size: 13px; }
    .kachel-kopf { flex-wrap: wrap; gap: 8px; }
}

/* ---------- Handy und Tablet hochkant: Tabellen als Karten (alle Module) ---------- */
.mobil-zurueck { display: none; }
@media (max-width: 900px) {
    .table.karten-tabelle { display: block; overflow: visible; border: 0; }
    .table.karten-tabelle thead { display: none; }
    .table.karten-tabelle tbody { display: flex; flex-direction: column; gap: 10px; padding: 10px; }
    .table.karten-tabelle tr { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
    .table.karten-tabelle tr.inactive { opacity: .7; }
    .table.karten-tabelle td { display: block; padding: 3px 0; border: 0; width: auto !important; min-width: 0; overflow-wrap: anywhere; text-align: left; }
    .table.karten-tabelle td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 1px; }
    .table.karten-tabelle td[data-label=""]::before { display: none; }
    .table.karten-tabelle td input:not([type=checkbox]):not([type=radio]), .table.karten-tabelle td select, .table.karten-tabelle td textarea { width: 100%; min-width: 0; }
    .table.karten-tabelle td.actions { display: flex; justify-content: flex-start; flex-wrap: wrap; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); margin-top: 4px; }
    .table.karten-tabelle td.actions::before { display: none; }
    .table.karten-tabelle td.karte-breit { display: block; }
    .table.karten-tabelle td:empty { display: none; }
    .table.karten-tabelle .zeit-jetzt { flex: 1; display: flex; }
    .table.karten-tabelle .zeit-jetzt input { flex: 1; }
    .ze-pruefen td { background: transparent; }
    .table.karten-tabelle tr.ze-pruefen { border-color: #f0d98a; background: #fffbea; }
}
/* Tablet hochkant: Felder einer Karte zweispaltig (mehr Platz als am Handy), Knöpfe und breite Zellen über die volle Breite */
@media (min-width: 701px) and (max-width: 900px) {
    .table.karten-tabelle tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 18px; }
    .table.karten-tabelle td.actions, .table.karten-tabelle td.karte-breit { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
    /* Einsätze: Liste ODER Detail */
    .split { display: block; min-height: 0; }
    .split.mobil-detail .list-panel { display: none; }
    .split:not(.mobil-detail) .detail-panel { display: none; }
    .list-panel .list-scroll { max-height: none; }
    .mobil-zurueck { display: block; padding: 10px 14px; font-weight: 700; color: var(--red); text-decoration: none; border-bottom: 1px solid var(--line); }
}
.app-install[hidden] { display: none; }

/* Anwesenheit: Status je Person */
.anw-st { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 700; vertical-align: middle; }
.anw-st.st-anwesend { background: #edf8f0; color: #17692f; }
.anw-st.st-entschuldigt { background: #fff5e0; color: #8a5a00; }
.anw-st.st-abwesend { background: var(--red-soft); color: var(--red-dark); }
tr.anw-zeile.st-entschuldigt td, tr.anw-zeile.st-abwesend td { color: var(--muted); }
tr.anw-zeile.st-entschuldigt input[type=datetime-local], tr.anw-zeile.st-abwesend input[type=datetime-local] { opacity: .4; }

/* Dienstplan: Termin-Editor */
.dp-editor { display: grid; gap: 14px; max-width: 980px; }
.dp-block h3 { margin: 0 0 12px; font-size: 15px; }
.dp-wann { display: grid; grid-template-columns: 190px 130px 130px 1fr; gap: 14px; align-items: end; }
.dp-tag { display: flex; flex-direction: column; padding: 8px 14px; border-left: 3px solid var(--red); }
.dp-tag b { font-size: 18px; }
.dp-tag small { color: var(--muted); }
.dp-dauer { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.chip-knopf { padding: 5px 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; font: inherit; font-size: 12px; cursor: pointer; }
.chip-knopf:hover { border-color: var(--red); color: var(--red); }
.dp-kategorien { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.dp-kat-wahl { margin: 0; cursor: pointer; }
.dp-kat-wahl input { position: absolute; opacity: 0; }
.dp-kat-wahl span { display: inline-block; padding: 7px 14px; border-radius: 16px; border: 2px solid var(--farbe); color: var(--farbe); font-weight: 700; font-size: 13px; }
.dp-kat-wahl input:checked + span { background: var(--farbe); color: #fff; }
.dp-kat-wahl input:focus-visible + span { outline: 2px solid var(--ink); }
.dp-wer { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dp-beschreibung div { line-height: 1.5; }
@media (max-width: 700px) {
    .dp-wann, .dp-wer { grid-template-columns: 1fr 1fr; }
    .dp-wann > div:first-child, .dp-tag { grid-column: 1 / -1; }
}

/* Dienstplan: Personen erfassen (Mehrfachauswahl als Kacheln) */
.dp-erfassen h3 { font-size: 15px; margin: 0 0 10px; }
.dp-erfassen-kopf { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 10px; }
.dp-erfassen-kopf input[type=search] { flex: 1 1 220px; max-width: 320px; }
.dp-personen { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; max-height: 340px; overflow-y: auto; padding: 2px; }
.dp-person { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; font-weight: 400; background: #fff; }
.dp-person[hidden] { display: none; }
.dp-person input { margin: 0; width: auto; }
.dp-person.an { border-color: var(--red); background: var(--red-soft); font-weight: 700; }
.dp-erfassen-fuss { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.dp-erfassen-fuss select { width: auto; }
.dp-erfassen-extra { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.anw-k-entschuldigt:not(:disabled) { border-color: #e0b44a; color: #8a5a00; }
.anw-k-abwesend:not(:disabled) { border-color: var(--red); color: var(--red-dark); }
@media (max-width: 700px) { .dp-personen { grid-template-columns: 1fr 1fr; max-height: none; } }

/* Betrieb: ELW-Status und Nur-lesen-Hinweis */
.betrieb-elw { padding: 4px 10px; border-radius: 12px; font-weight: 800; font-size: 12px; white-space: nowrap; }
.betrieb-elw.live { background: #dff5e6; color: #17692f; }
.betrieb-elw.offline { background: #ffe2c2; color: #8a4300; }
.betrieb-banner { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 14px; margin-bottom: 14px; border-radius: var(--radius); font-size: 14px; }
.betrieb-banner.live { background: #edf8f0; border: 1px solid #bfe5c9; color: #17692f; }
.betrieb-banner.offline { background: #fff1e0; border: 2px solid #f0a050; color: #8a4300; }
@media (max-width: 700px) { .topbar .betrieb-elw { display: inline-block; } }

/* Meldeportal / Ticketsystem */
.tk-form > label { display: block; margin-top: 12px; }
.tk-kategorien { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.tk-kat-wahl { margin: 0; cursor: pointer; }
.tk-kat-gruppen[hidden], .tk-kat-auswahl[hidden] { display: none; }
.tk-kat-gruppe + .tk-kat-gruppe { margin-top: 14px; }
.tk-kat-gruppe h4 { margin: 4px 0 6px; font-size: .9rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.tk-kat-auswahl { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 2px solid var(--red); border-radius: var(--radius); background: var(--red-soft); scroll-margin-top: 70px; }
.tk-kat-wahl input { position: absolute; opacity: 0; }
.tk-kat-wahl span { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 2px solid var(--line); border-radius: var(--radius); height: 100%; }
.tk-kat-wahl small { color: var(--muted); font-weight: 400; }
.tk-kat-wahl input:checked + span { border-color: var(--red); background: var(--red-soft); }
.tk-kat-wahl input:focus-visible + span { outline: 2px solid var(--ink); }
.tk-felder { border: 0; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px 16px; }
.tk-felder[hidden] { display: none; }
.tk-feld small { display: block; }
.tk-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 10px; }
.tk-kopf h3 { margin: 0; }
.tk-filter { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.tk-filter.tk-filter-spalten { flex-direction: column; flex-wrap: nowrap; justify-content: flex-start; align-items: flex-start; }
/* Ticketliste: Suche oben links, daneben Team, Kategorie (Mehrfachauswahl) und „nur mir zugewiesen“; darunter die Status-Reiter */
.tk-filter-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; width: 100%; }
.tk-filter-zeile .tk-suche { flex: 0 1 340px; min-width: 220px; }
.tk-filter-zeile .tk-multi { min-width: 200px; max-width: 280px; }
.tk-filter-zeile .tk-multi .multi-knopf { padding: 9px 12px; }
.tk-filter-zeile .tk-multi .multi-knopf [data-multi-text] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.tk-meta { grid-template-columns: 160px 1fr; }
.tk-beschreibung { margin-top: 12px; padding: 10px 12px; background: #f7f8fa; border-radius: var(--radius); line-height: 1.5; }
.tk-anhaenge { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tk-anhang { padding: 4px 10px; border: 1px solid var(--line); border-radius: 14px; font-size: 12px; text-decoration: none; color: var(--ink); }
.tk-anhang:hover { border-color: var(--red); }
/* Team-Postfach: Anhänge öffnen (PDF/Bilder) oder herunterladen */
.mp-anhang { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 14px; font-size: 12px; overflow: hidden; background: var(--panel); }
.mp-anhang a { text-decoration: none; color: var(--ink); padding: 5px 10px; }
.mp-anhang-name { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-anhang-dl { border-left: 1px solid var(--line); font-weight: 700; }
.mp-anhang:hover { border-color: var(--red); }
.mp-anhang a:hover { background: var(--red-soft); }
.mp-anhang button.mp-anhang-nas { border: 0; border-left: 1px solid var(--line); background: none; padding: 5px 9px; font: inherit; cursor: pointer; }
.mp-anhang button.mp-anhang-nas:hover { background: var(--red-soft); }
.mp-ablage-anhaenge { display: grid; gap: 2px; margin: 8px 0 0; padding: 4px; border: 1px solid var(--line); border-radius: 8px; max-height: 160px; overflow-y: auto; }
.mp-dateien { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border: 1px dashed var(--line); border-radius: var(--radius); }
.mp-dateien label { font-weight: 600; }
.mp-dateien input[type="file"] { font-size: 13px; }
.mp-dateiliste { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.mp-dateiliste li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 8px; background: var(--bg); border-radius: var(--radius); }
.mp-dateiliste li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-datei-weg { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 14px; padding: 2px 6px; }
.mp-datei-weg:hover { color: var(--red); }
.mp-dateiliste li.mp-datei-warnung { background: var(--red-soft); color: var(--red-dark); font-weight: 600; }
@media (max-width: 700px) { .mp-anhang-name { max-width: 200px; } }
/* Team-Postfach: Filterleiste – Ordner · Suche (breit) · Ansichten · Postfächer (rechts) */
.mp-filterleiste { justify-content: flex-start; gap: 10px 12px; }
.mp-filterleiste .mp-rechts { margin-left: auto; }
.mp-suche { display: flex; align-items: center; gap: 10px; flex: 1 1 320px; min-width: 240px; max-width: 560px; }
.mp-suche input[type="search"] { flex: 1 1 auto; min-width: 0; width: 100%; padding: 8px 12px; font-size: 14px; }
.seg a.mp-seg-filter { border-left: 2px solid var(--line); }
.mp-sammel-leiste[hidden] { display: none; }
.mp-rechts .mp-pf-auswahl { left: auto; right: 0; }
@media (max-width: 700px) {
    .mp-suche { flex-basis: 100%; max-width: none; order: -1; }
    .mp-filterleiste .mp-rechts { margin-left: 0; }
}
/* Team-Postfach: Postfach-Filter mit Mehrfachauswahl */
.mp-pf-filter { position: relative; }
.mp-pf-filter > summary { list-style: none; cursor: pointer; white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.mp-pf-filter > summary::-webkit-details-marker { display: none; }
.mp-pf-filter > summary.mp-pf-aktiv { border-color: var(--red); color: var(--red-dark); background: var(--red-soft); }
.mp-pf-auswahl { position: absolute; z-index: 50; top: calc(100% + 6px); left: 0; width: min(340px, calc(100vw - 32px)); max-height: 60vh; overflow: auto;
    display: flex; flex-direction: column; gap: 6px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(0, 0, 0, .18); }
.mp-pf-auswahl label.check { display: flex; gap: 8px; align-items: baseline; margin: 0; }
.mp-pf-auswahl label.check small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-pf-schnell { display: flex; gap: 6px; }
.mp-pf-gruppe { margin-top: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.mp-pf-auswahl .form-actions { margin-top: 4px; }
/* Team-Postfach: Ladeanzeige beim Senden */
.mp-senden { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px;
    background: rgba(20, 24, 30, .55); animation: mp-einblenden .15s ease-out; }
.mp-senden-box { display: flex; flex-direction: column; align-items: center; gap: 14px; width: min(340px, 100%); padding: 26px 24px;
    background: var(--panel); color: var(--ink); border-radius: 12px; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); text-align: center; }
.mp-senden-box b { font-size: 16px; }
.mp-senden-box small { color: var(--muted); }
.mp-spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--red); animation: mp-drehen .8s linear infinite; }
.mp-balken { width: 100%; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.mp-balken span { display: block; width: 40%; height: 100%; background: var(--red); border-radius: 3px; animation: mp-laufen 1.2s ease-in-out infinite; }
@keyframes mp-drehen { to { transform: rotate(360deg); } }
@keyframes mp-laufen { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
@keyframes mp-einblenden { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mp-spinner { animation-duration: 2.4s; } .mp-balken span { animation: none; width: 100%; opacity: .5; } }
/* Team-Postfach: „Senden rückgängig“ (Countdown vor dem Versand) */
.mp-verzoegern { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px;
    background: rgba(20, 24, 30, .55); animation: mp-einblenden .15s ease-out; }
.mp-verzoegern .mp-senden-box { width: min(420px, 100%); }
.mp-vz-info { margin: 0; }
.mp-vz-balken { width: 100%; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.mp-vz-balken span { display: block; height: 100%; background: var(--red); border-radius: 3px; transform-origin: left; animation: mp-ablaufen linear forwards; }
.mp-vz-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
@keyframes mp-ablaufen { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.tk-kommentar { padding: 10px 12px; margin-bottom: 10px; border-left: 3px solid var(--line); background: #fafbfc; border-radius: 0 var(--radius) var(--radius) 0; }
.tk-kommentar.vom-melder { border-left-color: #3b82f6; }
.tk-kommentar.intern { border-left-color: #c99a00; background: #fffbea; }
.tk-k-kopf { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 4px; }
.tk-antwort { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.tk-antwort-optionen { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin: 10px 0; }
.tk-antwort-optionen select { width: auto; }
.tk-log { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.tk-kat-form { display: grid; grid-template-columns: 1fr 1fr 2fr 100px auto auto; gap: 10px; align-items: end; }
@media (max-width: 1000px) { .tk-layout { grid-template-columns: minmax(0, 1fr); } .tk-kat-form { grid-template-columns: 1fr 1fr; } .tk-kat-form .tk-breit { grid-column: 1 / -1; } }
@media (max-width: 700px) { .tk-meta { grid-template-columns: 1fr; } .tk-kat-form { grid-template-columns: 1fr; } }
.pill.tk-status { background: color-mix(in srgb, var(--farbe) 14%, #fff); color: var(--farbe); border: 1px solid color-mix(in srgb, var(--farbe) 35%, #fff); }

/* Ticket: Unteraufgaben (nur Team) */
.tk-fortschritt { height: 6px; margin: -4px 0 12px; background: #eef0f3; border-radius: 3px; overflow: hidden; }
.tk-fortschritt span { display: block; height: 100%; background: #2fb35a; }
.tk-aufgabe { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.tk-aufgabe-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tk-aufgabe.erledigt .tk-aufgabe-text b { text-decoration: line-through; color: var(--muted); }
.tk-haken { width: 24px; height: 24px; flex-shrink: 0; padding: 0; border: 2px solid var(--line); border-radius: 5px; background: #fff; color: #fff; font-weight: 900; cursor: pointer; line-height: 20px; }
.tk-haken:hover:not(:disabled) { border-color: #2fb35a; }
.tk-aufgabe.erledigt .tk-haken { background: #2fb35a; border-color: #2fb35a; }
.tk-aufgabe-edit { min-width: 320px; padding: 12px; }
.tk-aufgabe-edit label { display: block; margin-bottom: 6px; }
.tk-aufgabe-neu { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tk-aufgabe-neu input[type=text] { flex: 1 1 260px; }
.tk-aufgabe-neu textarea { flex: 1 1 100%; min-height: 0; }
.tk-aufgabe-beschreibung { margin-top: 4px; padding: 6px 10px; border-left: 3px solid var(--line); background: #f8f9fb; border-radius: 4px; font-size: 13px; color: var(--ink); white-space: normal; overflow-wrap: anywhere; }
.tk-aufgabe.erledigt .tk-aufgabe-beschreibung { opacity: .7; }
.tk-aufgabe-neu select, .tk-aufgabe-neu input[type=date] { width: auto; }
@media (max-width: 700px) { .tk-aufgabe-edit { min-width: 0; width: calc(100vw - 40px); } }

/* Startseite: Kachel „Tickets“ */
.kachel-tickets .tk-d-status { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.kachel-tickets .tk-d-status a { text-decoration: none; color: var(--ink); display: inline-flex; gap: 4px; align-items: center; }
.kachel-tickets .tk-d-titel { margin: 12px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tk-d-zeile { display: grid; grid-template-columns: 96px 1fr auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 13px; }
.tk-d-zeile:hover b { color: var(--red); }
.tk-d-zeile span { display: flex; flex-direction: column; min-width: 0; }
.tk-d-zeile small { color: var(--muted); }
@media (max-width: 700px) { .kacheln > .kachel-tickets { order: -1; } .tk-d-zeile { grid-template-columns: 1fr auto; } .tk-d-zeile b { grid-column: 1 / -1; } }
/* Startseite: Listen in Kacheln scrollen nach N Zeilen (Höhe setzt dashboard.php) */
.kachel-scroll { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.kachel-scroll.ist-scroll { border-bottom: 1px solid var(--line); box-shadow: inset 0 -10px 8px -10px rgba(0, 0, 0, .18); }
/* Startseite: Kachel E-Mails */
.mp-d-postfaecher { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.mp-d-pf { display: inline-flex; gap: 6px; align-items: center; padding: 3px 10px; border: 1px solid var(--line); border-radius: 14px; font-size: 12px; color: var(--muted); text-decoration: none; }
.mp-d-pf b { color: var(--muted); }
.mp-d-pf.hat-neue { border-color: var(--red); color: var(--ink); background: var(--red-soft); }
.mp-d-pf.hat-neue b { color: var(--red-dark); }
.mp-d-zeile { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 13px; }
.mp-d-zeile span { display: flex; flex-direction: column; min-width: 0; }
.mp-d-zeile span b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-d-zeile small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-d-zeile:hover b { color: var(--red); }
.mp-d-zeit { white-space: nowrap; }
@media (max-width: 700px) { .kacheln > .kachel-mails { order: -1; } }

/* Ticketsystem: Formularfelder & Optionen, Wehren-Freigabe */
.tk-feldliste { display: flex; flex-direction: column; gap: 6px; }
.tk-feld-eintrag { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.tk-feld-eintrag > summary { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; padding: 8px 12px; cursor: pointer; list-style: none; }
.tk-feld-eintrag > summary::-webkit-details-marker { display: none; }
.tk-feld-eintrag.neu > summary { color: var(--red); }
.tk-feld-eintrag.inaktiv { opacity: .65; }
.tk-feld-bearbeiten { margin-left: auto; font-size: 12px; color: var(--muted); }
.tk-feld-form { padding: 0 12px 12px; border-top: 1px solid var(--line); }
.tk-feld-raster { display: grid; grid-template-columns: 1fr 180px 2fr 100px auto; gap: 10px; align-items: end; padding-top: 10px; }
.tk-feld-haken { display: flex; flex-direction: column; gap: 4px; }
.tk-optionen { margin-top: 10px; padding: 10px; background: #f7f8fa; border-radius: var(--radius); }
.tk-option { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; max-width: 420px; }
.tk-feld-knoepfe { margin: 10px 0 0; display: flex; gap: 8px; }
.tk-wehren-wahl { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.tk-wehren-wahl > label:first-child { flex-basis: 100%; }
.tk-wehren-chips { flex-basis: 100%; }
.tk-wehren-chips[hidden] { display: none; }
@media (max-width: 900px) { .tk-feld-raster { grid-template-columns: 1fr 1fr; } .tk-feld-raster .tk-breit { grid-column: 1 / -1; } }

/* Mehrfachauswahl als Dropdown (z. B. Wehren einer Meldekategorie) */
.multi-dropdown { position: relative; display: inline-block; min-width: 320px; max-width: 100%; }
.multi-dropdown[hidden] { display: none; }
.multi-knopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius);
    background: #fff; cursor: pointer; list-style: none; font-size: 14px; }
.multi-knopf::-webkit-details-marker { display: none; }
.multi-dropdown[open] .multi-knopf { border-color: var(--red); }
.multi-pfeil { color: var(--muted); }
.multi-liste { position: absolute; left: 0; top: calc(100% + 4px); z-index: 30; width: max(100%, 340px); padding: 8px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(0, 0, 0, .12); }
.multi-kopf { display: flex; gap: 6px; margin-bottom: 6px; }
.multi-kopf input { flex: 1; }
.multi-optionen { max-height: 280px; overflow-y: auto; }
.multi-option { display: flex; align-items: center; gap: 8px; margin: 0; padding: 6px 8px; border-radius: 4px; font-weight: 400; cursor: pointer; }
.multi-option:hover { background: #f3f6fb; }
.multi-option[hidden] { display: none; }
.multi-option input { width: auto; margin: 0; }
/* Kategorie-Formular: Freigabe immer in eigener Zeile über die volle Breite */
.tk-kat-form { grid-template-columns: minmax(180px, 1.2fr) minmax(150px, 1fr) minmax(200px, 2fr) 110px auto; }
.tk-kat-form .tk-wehren-wahl { grid-column: 1 / -1; }
.tk-kat-form > div:last-child { grid-column: 1 / -1; }
@media (max-width: 700px) { .multi-dropdown { min-width: 0; width: 100%; } .multi-liste { width: 100%; } }
.tk-wehren-wahl .multi-dropdown { flex-basis: auto; }
.tk-gelesen { padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.multi-dropdown.multi-breit { display: block; width: 100%; }
.multi-dropdown.hat-auswahl .multi-knopf { font-weight: 700; }
.funktionen-form { margin-top: 8px; flex-wrap: wrap; }
.funktionen-form .multi-dropdown { min-width: 280px; flex: 1 1 280px; }
tr[data-href] { cursor: pointer; } tr[data-href]:hover td { background: #f7f9fc; }

/* ---------- Einsätze: Liste mit fester Breite, Details passen sich an (nichts wird abgeschnitten) ---------- */
@media (min-width: 1001px) {
    .split { grid-template-columns: 400px minmax(0, 1fr); }
}
@media (min-width: 1600px) {
    .split { grid-template-columns: 440px minmax(0, 1fr); }
}
.split > .detail-panel { min-width: 0; }
.list-item, .list-head { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 18px; }
.list-item > div { min-width: 0; overflow-wrap: anywhere; }
/* Kopf des Einsatzes: Daten links, Knöpfe rechts – bei wenig Platz darunter */
.detail-head { flex-wrap: wrap; }
.detail-head > div:first-child { flex: 1 1 420px; min-width: 0; }
.detail-head h2 { flex-wrap: wrap; }
.detail-side { flex: 0 0 auto; }
.detail-head .meta { grid-template-columns: max-content minmax(0, 1fr); }
.detail-head .meta dd { overflow-wrap: anywhere; }
/* Reiter: eine Zeile, bei vielen Reitern waagerecht scrollbar statt abgeschnitten */
.detail-tabs > .tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: thin; }
.detail-tabs > .tabs button { flex-shrink: 0; white-space: nowrap; }
/* Inhalt der Reiter: breite Tabellen (z. B. Einsatzmittel mit Zeitfeldern) scrollen im Reiter */
.detail-tabs > [data-tab-panel] { min-width: 0; overflow-x: auto; }
.detail-tabs > [data-tab-panel] .table { min-width: 100%; }
@media (min-width: 701px) {
    .em-edit { min-width: 980px; }
    .em-edit input[type=datetime-local] { min-width: 175px; }
}
/* Eckdaten (Einsatzort, Meldeweg, Koordinaten): umbrechen statt quetschen */
.facts { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.facts > div { min-width: 0; overflow-wrap: anywhere; border-bottom: 1px solid var(--line); }
.infos-meta { grid-template-columns: max-content minmax(0, 1fr); }
.infos-meta dd { overflow-wrap: anywhere; }

/* Anwesenheit im Einsatz: mehrere Personen auf einmal eintragen */
.anw-neu { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; padding: 12px 18px; border-top: 1px solid var(--line); }
.anw-neu select { width: auto; }
.anw-neu small { flex-basis: 100%; }
.anw-neu .multi-dropdown { min-width: 300px; flex: 1 1 300px; max-width: 520px; }
/* Liste klappt im Fluss auf (wird in scrollenden Reitern nicht abgeschnitten) */
.multi-inline .multi-liste { position: static; width: 100%; margin-top: 4px; box-shadow: none; }

/* Team-Postfach */
.mp-liste tr.mp-ungelesen td { background: #fbfcff; }
.mp-liste tr.mp-ungelesen td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.mp-liste tr.mp-abschnitt td { padding: 6px 12px; background: var(--bg) !important; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); cursor: default; }
.mp-liste .mp-wahl { width: 34px; padding-right: 0; text-align: center; }
.mp-liste .mp-wahl input { width: 18px; height: 18px; margin: 0; cursor: pointer; }
.mp-liste tr.mp-gewaehlt td { background: #fff4e5 !important; }
.mp-sammel-leiste { position: sticky; top: var(--topbar-h); z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
    margin: 0 16px 10px; padding: 8px 12px; background: var(--red-soft); border: 1px solid #f3c4cb; border-radius: var(--radius); }
.mp-sammel-leiste b { margin-right: 6px; color: var(--red-dark); }
.mp-ordner-wahl { display: inline-flex; gap: 6px; align-items: center; }
.mp-ordner-wahl select { max-width: 240px; }
.mp-ordner-wahl select.mp-pf-aktiv { border-color: var(--red); background-color: var(--red-soft); }
.mp-ordner-kopf { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding-bottom: 10px; font-size: 15px; }
.mp-ordner-pill { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.mp-ticket { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.mp-kopf { grid-template-columns: 90px minmax(0, 1fr); }
.mp-kopf dd { overflow-wrap: anywhere; }
.mp-inhalt { display: block; width: 100%; min-height: 420px; height: 60vh; border: 0; border-top: 1px solid var(--line); background: #fff; }
.mp-schreiben { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; }
.mp-schreiben label { margin: 0; }
/* Mail-Ansicht: Aktionsleiste oben, Antworten/Weiterleiten/Ticket als eigene Fenster */
.mp-aktionsleiste { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg); border-radius: var(--radius) var(--radius) 0 0; }
dialog.mp-dialog { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .3); background: var(--panel); color: var(--ink); overflow: auto; }
dialog.mp-dialog.mp-dialog-klein { width: min(480px, calc(100vw - 32px)); }
dialog.mp-dialog::backdrop { background: rgba(20, 24, 30, .5); }
dialog.mp-dialog .mp-schreiben { padding: 0 20px 20px; }
.mp-dialog-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; z-index: 2;
    margin: 0 -20px; padding: 14px 20px; background: var(--panel); border-bottom: 1px solid var(--line); }
.mp-dialog-kopf h3 { margin: 0; font-size: 18px; }
.mp-dialog-zu { border: 0; background: none; font-size: 20px; line-height: 1; padding: 6px 8px; cursor: pointer; color: var(--muted); border-radius: 8px; }
.mp-dialog-zu:hover { background: var(--line); color: var(--ink); }
.mp-dialog-info { margin: 4px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-dialog .form-actions { flex-wrap: wrap; align-items: center; }
html.dialog-offen { overflow: hidden; }
@media (max-width: 700px) {
    dialog.mp-dialog, dialog.mp-dialog.mp-dialog-klein { width: 100vw; max-width: 100vw; height: 100%; max-height: 100%; margin: 0; border-radius: 0; }
    .mp-aktionsleiste .btn { flex: 1 1 calc(50% - 8px); } /* andere Seiten; Mail-Ansicht: Symbolleiste unten, s. u. */
    .mp-dialog .form-actions .btn { flex: 1 1 auto; }
}
.mp-verlauf { grid-template-columns: 1fr auto; }
.mp-rechte td, .mp-rechte th { text-align: center; }
.mp-rechte td:first-child, .mp-rechte th:first-child { text-align: left; }

/* Adresssuche aus dem Telefonbuch (Team-Postfach) */
.adr-box { position: relative; }
.adr-box > input { width: 100%; }
.adr-pillen { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 4px 6px; min-height: 40px; cursor: text;
    border: 1px solid var(--line); border-radius: var(--radius, 8px); background: var(--panel, #fff); }
.adr-pillen:focus-within { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, .15); }
.adr-pillen.adr-fehler { border-color: var(--red); }
.adr-pillen > input.adr-eingabe { flex: 1 1 140px; width: auto; min-width: 120px; border: 0; box-shadow: none; outline: 0; padding: 4px; background: transparent; }
.adr-pillen.adr-fehler > input.adr-eingabe { color: var(--red); }
.adr-pille { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 2px 4px 2px 10px; border-radius: 999px;
    background: #e8f0fe; border: 1px solid #c6d7fb; color: #1e3a8a; font-size: 13px; line-height: 1.6; }
.adr-pille > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adr-pille > b + span { color: #4b5d8c; font-size: 12px; }
.adr-pille > button { border: 0; background: transparent; color: inherit; cursor: pointer; width: 22px; height: 22px; border-radius: 50%; padding: 0; font-size: 12px; line-height: 22px; }
.adr-pille > button:hover, .adr-pille > button:focus-visible { background: rgba(30, 58, 138, .15); }
.adr-liste { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin: 2px 0 0; padding: 4px 0; list-style: none;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 18px rgba(0,0,0,.12);
    max-height: 300px; overflow-y: auto; }
.adr-liste li { padding: 6px 10px; cursor: pointer; display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; }
.adr-liste li span { color: var(--muted, #6b7280); font-size: 13px; }
.wehr-kontakt { position: relative; }
.wehr-kontakt .inline-add input[type=search] { flex: 1 1 auto; }
.adr-liste li small { flex-basis: 100%; color: var(--muted, #6b7280); }
.adr-liste li.aktiv { background: #eef4ff; }
.adr-liste li.adr-leer { cursor: default; color: var(--muted, #6b7280); }

/* Team-Postfach: Anbindung (Microsoft 365 / IMAP-SMTP) */
.mp-verbindung { grid-column: 1 / -1; display: grid; gap: 10px; }
.mp-verbindung > div:first-child { max-width: 360px; }
.mp-imap[hidden] { display: none; }
.mp-imap { display: grid; gap: 10px; }
.mp-imap fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px 12px; margin: 0; display: grid; gap: 8px; }
.mp-imap legend { font-weight: 600; padding: 0 4px; }
.mp-zeile { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; align-items: end; }
.mp-zeile:has(> div:nth-child(2):last-child) { grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) { .mp-zeile, .mp-zeile:has(> div:nth-child(2):last-child) { grid-template-columns: 1fr; } }

/* Meine Informationen */
.mi-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; align-items: start; }
.mi-raster h3 { margin: 0 0 8px; }
.mi-raster * + h3 { margin-top: 18px; } /* Abstand zwischen Abschnitten (z. B. nach der Konto-Liste) */
.mi-form { display: grid; gap: 6px; align-content: start; }
.mi-form h3 { margin-bottom: 4px; }
.mi-zahlen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.mi-zahlen > div { background: #f5f7fa; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; text-align: center; }
.mi-zahlen b { display: block; font-size: 20px; }
.mi-zahlen small { color: var(--muted); }
.mi-anfrage { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kachel-knoepfe { display: flex; gap: 6px; flex-wrap: wrap; }
.kachel-kopf h3 a { color: inherit; text-decoration: none; }
.ba-form { display: grid; gap: 6px; }
.ba-form > div { display: flex; gap: 6px; flex-wrap: wrap; }
.mi-geraet-neu { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 14px; display: grid; gap: 6px; }
.mi-geraet-neu.hervor { border-color: var(--red, #c8102e); box-shadow: 0 0 0 3px rgba(200, 16, 46, .12); }
.mi-geraet-neu h3 { margin: 0; }
.geraete-einst { display: grid; gap: 8px; max-width: 760px; }
.mi-push { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #f8fafc; }
.mi-push [data-push-status] { flex-basis: 100%; margin: 0; }

/* Testeinsatz: Vorlagen */
.test-wahl:not(.ist-test) .test-vorlagen { display: none; }
.test-vorlagen { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); display: grid; gap: 10px; }
.tv-raster { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; align-items: start; }
.tv-raster > div { display: grid; gap: 6px; }
.tv-raster select[size] { width: 100%; min-height: 120px; }
.tv-fahrzeuge { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.tv-speichern { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tv-speichern-felder { display: none; gap: 8px; flex-wrap: wrap; }
.tv-speichern.an .tv-speichern-felder { display: inline-flex; }
@media (max-width: 800px) { .tv-raster { grid-template-columns: 1fr; } }
.tv-fz-tabelle input[type="text"] { width: 100%; }
.tv-nach { white-space: nowrap; }
.tv-nach input { width: 70px; }

/* Handbuch */
.hb-layout { display: grid; grid-template-columns: 260px 1fr; gap: 16px; align-items: start; }
.hb-inhalt { position: sticky; top: 12px; display: grid; gap: 8px; }
.hb-inhalt ol { margin: 0; padding-left: 20px; line-height: 1.7; }
.hb-text h2 { margin-top: 0; color: var(--red-dark, #a50d25); }
.hb-text h3 { margin: 16px 0 6px; }
.hb-text table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.hb-text th, .hb-text td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.hb-text th { background: #f5f7fa; }
.hb-text td ul { margin: 0; padding-left: 18px; }
@media (max-width: 900px) { .hb-layout { grid-template-columns: 1fr; } .hb-inhalt { position: static; } }
@media print { .hb-inhalt, .page-actions { display: none; } .hb-layout { display: block; } .hb-kapitel { break-inside: auto; } }

/* Benutzerliste: Sammelbearbeitung & Dauer-Login-Schalter */
.sammel-leiste { position: sticky; top: 8px; z-index: 20; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; border: 2px solid var(--red, #c8102e); }
.sammel-leiste[hidden] { display: none; }
.sammel-kopf, .sammel-teil { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sammel-teil[hidden] { display: none; }
.dl-schalter { width: 40px; height: 22px; border-radius: 11px; border: 0; background: #cfd5dc; position: relative; cursor: pointer; vertical-align: middle; }
.dl-schalter span { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.dl-schalter.an { background: #1e9e4a; }
.dl-schalter.an span { left: 21px; }

/* Versionierung / Update-Historie */
.version-link { color: inherit; text-decoration: none; opacity: .8; }
.version-link:hover { text-decoration: underline; opacity: 1; }
.update-hinweis { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.upd-version.ist-neu { border-left: 4px solid #1e9e4a; }
.upd-kopf { display: flex; gap: 14px; align-items: center; }
.upd-kopf h2 { margin: 0; font-size: 18px; }
.upd-nr { font-weight: 700; font-size: 15px; background: var(--red, #c8102e); color: #fff; border-radius: 6px; padding: 6px 10px; white-space: nowrap; }
.upd-liste { margin: 12px 0 0; padding-left: 20px; line-height: 1.6; }
.upd-technik { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 8px; }
.upd-technik summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.upd-technik h4 { margin: 10px 0 4px; font-size: 13px; }
.upd-dateien { columns: 2; font-size: 12px; }
@media (max-width: 700px) { .upd-dateien { columns: 1; } }

/* Einsatz: Rückmeldung Komme / Komme nicht */
.rm-box { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #f8fafc; }
.rm-zahl { margin-left: auto; font-size: 13px; }
.rm-liste { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 12px; }

/* Alarm-Popup (überblendet jede Seite) */
.alarm-popup { position: fixed; inset: 0; z-index: 10000; background: #111418; }
.alarm-popup iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.alarm-popup .ap-zu { position: absolute; top: calc(8px + env(safe-area-inset-top)); right: 10px; z-index: 2; font: inherit; font-size: 15px; font-weight: 700;
                      padding: 8px 12px; border-radius: 20px; border: 0; background: rgba(0, 0, 0, .55); color: #fff; cursor: pointer; }
html.alarm-popup-offen, html.alarm-popup-offen body { overflow: hidden; }

/* Sichter */
.si-zeile { display: grid; grid-template-columns: 1.3fr 1.2fr 1.5fr auto; gap: 12px; align-items: start; padding: 12px 16px; border-top: 1px solid var(--line); }
.si-zeile:first-child { border-top: 0; }
.si-zeile.ist-geparkt { background: #fafafa; }
.si-einsatz a { text-decoration: none; color: inherit; }
.si-ap, .si-einsatz { display: grid; gap: 4px; }
.si-fz { display: flex; flex-wrap: wrap; gap: 4px; }
.si-ansicht { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 900px) { .si-zeile { grid-template-columns: 1fr; } }
.si-ap .ae-ap { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px; align-items: center; }
.si-ap .chip { display: inline-flex; }
.ae-fz-mehr { display: inline-block; padding: 2px 8px; border-radius: 10px; background: #eef1f4; color: var(--ink, #1c1f24); font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.ae-personal { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 4px; }
.ae-personal a { text-decoration: none; color: inherit; }
.ae-personal .muted { flex-basis: 100%; }
.hb-kopf { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.hb-logo { height: 56px; width: auto; }
.hb-copyright { text-align: center; margin: 16px 0 8px; }
@media print { .hb-logo { height: 48px; } }

/* Ressourcen */
#res-tabelle tr.res-aus { display: none !important; }
.res-kontakt { position: relative; }

/* ---------- Tablet & Handy: Menüband für die Seitenknöpfe, Reiterleisten ohne Umbruch ---------- */
.page-actions .btn, .seg a { white-space: nowrap; }
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.seg::-webkit-scrollbar { display: none; }
.seg a { flex-shrink: 0; }
@media (max-width: 1180px) {
    .page-head { flex-direction: column; align-items: stretch; gap: 10px; }
    /* alle Knöpfe einer Seite in einer Zeile, seitlich wischbar */
    .page-actions { flex-wrap: nowrap; overflow-x: auto; gap: 8px; padding: 2px 2px 6px; margin: 0 -2px;
                    -webkit-overflow-scrolling: touch; scrollbar-width: none; scroll-snap-type: x proximity; }
    .page-actions::-webkit-scrollbar { display: none; }
    .page-actions > * { flex: 0 0 auto; scroll-snap-align: start; }
    .page-actions .btn { flex: 0 0 auto; padding: 8px 12px; font-size: 14px; line-height: 1.2; }
    .page-actions form { margin: 0; }
    /* Hinweis, dass es weitergeht: weicher Rand rechts bzw. links */
    .page-actions.mehr-rechts { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent);
                                mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }
    .page-actions.mehr-links.mehr-rechts { -webkit-mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent);
                                           mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
    .page-actions.mehr-links:not(.mehr-rechts) { -webkit-mask-image: linear-gradient(to right, transparent, #000 36px);
                                                 mask-image: linear-gradient(to right, transparent, #000 36px); }
    .seg a { padding: 6px 12px; font-size: 13px; }
    .tk-filter { flex-wrap: wrap; gap: 8px; }
}
/* Geräte ohne Maus: keine Tooltips an der Seitenleiste */
@media (hover: none) { .nav-tip { display: none !important; } }

/* Team-Postfach auf Handy und Tablet hochkant: kompakte Liste wie in einer Mail-App (statt Karten mit Spaltenüberschriften) */
@media (max-width: 900px) {
    .mp-liste thead { display: none; }
    .mp-liste, .mp-liste tbody { display: block; width: 100%; }
    .mp-liste tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "von zeit" "betreff betreff" "pf pf";
                   gap: 2px 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); border-left: 4px solid transparent; background: #fff; }
    .mp-liste tr.mp-ungelesen { border-left-color: var(--red); background: #fbfcff; }
    .mp-liste td { display: block; padding: 0; border: 0; background: none !important; box-shadow: none !important; min-width: 0; }
    .mp-liste td:nth-last-child(4) { grid-area: pf; }
    .mp-liste td:nth-last-child(3) { grid-area: von; font-size: 15px; overflow: hidden; }
    .mp-liste td:nth-last-child(3) br, .mp-liste td:nth-last-child(3) .muted { display: none; }   /* nur der Name, ohne Adresse */
    .mp-liste td:nth-last-child(2) { grid-area: betreff; font-size: 15px; }
    .mp-liste td:nth-last-child(2) small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; }
    .mp-liste td:nth-last-child(1) { grid-area: zeit; font-size: 12px; color: var(--muted); white-space: nowrap; }
    .mp-liste td .pill { font-size: 11px; padding: 1px 7px; }
    .mp-liste tr:not(.mp-ungelesen) td:nth-last-child(3) b { font-weight: 600; }
    .mp-liste.mp-mit-wahl tr { grid-template-columns: 30px minmax(0, 1fr) auto; grid-template-areas: "wahl von zeit" "wahl betreff betreff" "wahl pf pf"; }
    .mp-liste td.mp-wahl { grid-area: wahl; width: auto; align-self: center; text-align: left; }
    .mp-liste td.mp-wahl input { width: 22px; height: 22px; }
    .mp-sammel-leiste { margin: 0 8px 8px; top: 0; }
    .mp-sammel-leiste .btn { flex: 1 1 auto; }
    .mp-ordner-wahl select { max-width: 170px; }
    .mp-liste tr.mp-abschnitt { display: block; padding: 0; border-left: 0; background: var(--bg); }
    .mp-liste tr.mp-abschnitt td { padding: 6px 12px; }
}

/* Menü: lange Einträge sauber kürzen (Desktop: voller Name im Hinweis), auf dem Handy umbrechen */
.sidebar nav a .nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 700px) {
    .sidebar nav a { white-space: normal; line-height: 1.25; }
    .sidebar nav a .nav-label { overflow: visible; hyphens: auto; overflow-wrap: anywhere; }
}
/* Team-Postfach › Postfächer & Rechte: ausgewogene Spalten (Mandant nicht abgeschnitten) */
.tk-kat-form.mp-pf-form { grid-template-columns: 1.2fr 1.5fr 1fr 1fr 110px; }
.tk-kat-form.mp-pf-form > div:last-child { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 1000px) { .tk-kat-form.mp-pf-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .tk-kat-form.mp-pf-form { grid-template-columns: 1fr; } }

/* Mandanten-Auswahl in der Kopfzeile */
.mandant-wahl { position: relative; }
.mandant-wahl summary { list-style: none; cursor: pointer; font-size: 13px; font-weight: 600; padding: 6px 10px; border: 1px solid var(--line); border-radius: 16px; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.mandant-wahl summary::-webkit-details-marker { display: none; }
.mandant-liste { position: absolute; right: 0; top: calc(100% + 6px); z-index: 70; width: 280px; display: grid; gap: 8px; padding: 12px;
                 background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0, 0, 0, .14); }
@media (max-width: 700px) { .mandant-wahl summary span { display: none; } .mandant-liste { position: fixed; left: 10px; right: 10px; top: 60px; width: auto; } }

/* Problem melden / Admin-Tickets */
.sp-text { background: #f8fafc; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin: 10px 0; }
.sp-kommentar { padding: 8px 12px; border-left: 3px solid var(--line); margin: 8px 0; }
.sp-kommentar.von-admin { border-left-color: #2563eb; background: #f3f7ff; }
.sp-kommentar.intern { border-left-color: #d4a500; background: #fffbea; }
.sp-antwort { display: grid; gap: 8px; margin-top: 12px; }
.bv-teil { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px 12px; display: grid; gap: 8px;
           grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.bv-teil[hidden], .bv-teil [hidden] { display: none; }
.bv-teil legend { font-weight: 700; padding: 0 4px; }
.bv-teil p { grid-column: 1 / -1; margin: 0; }
.mp-gruppe { margin: 22px 0 8px; }
.mp-gruppe:first-of-type { margin-top: 8px; }
.mp-signatur { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px 12px; display: grid; gap: 8px; }
.mp-signatur legend { font-weight: 700; padding: 0 4px; }
.mp-signatur select { max-width: 360px; }
.mp-signatur textarea { width: 100%; font-family: monospace; font-size: 13px; }
.mp-signatur [hidden] { display: none; }
.mp-loeschen { margin-top: 12px; }
.mp-loeschen summary { cursor: pointer; color: var(--red-dark, #a50d25); }
.mp-loeschen form { margin-top: 8px; flex-wrap: wrap; }

/* Mail-Editor (Formatierung wie in Word) und Signatur-Vorschau */
.mail-editor { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.me-leiste { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; padding: 4px 6px; background: #f5f7fa; border-bottom: 1px solid var(--line); }
.me-leiste button { min-width: 32px; height: 32px; padding: 0 6px; border: 1px solid transparent; border-radius: 5px; background: none; cursor: pointer; font-size: 15px; color: var(--ink); }
.me-leiste button:hover { background: #fff; border-color: var(--line); }
.me-leiste button.an { background: #fff; border-color: var(--red); color: var(--red-dark, #a50d25); }
.me-leiste select { height: 32px; padding: 0 6px; font-size: 13px; width: auto; }
.me-trenner { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.me-farbe { display: inline-flex; align-items: center; gap: 2px; height: 32px; padding: 0 4px; border-radius: 5px; cursor: pointer; margin: 0; font-weight: 400; }
.me-farbe:hover { background: #fff; }
.me-farbe input { width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; }
.me-feld { padding: 10px 12px; outline: none; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; max-height: 60vh; overflow-y: auto; }
.me-feld:empty::before { content: attr(data-platzhalter); color: var(--muted); }
.me-feld ul, .me-feld ol { padding-left: 24px; }
.mail-sig { margin-top: 6px; padding: 8px 12px; border: 1px dashed var(--line); border-radius: var(--radius); background: #fafbfc; }
.mail-sig[hidden] { display: none; }
.mail-sig-inhalt { margin-top: 6px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; }
.mail-sig-inhalt img { max-width: 100%; height: auto; }

/* Bildschirmverwaltung: Mandant zuerst wählen, danach Umschalter oben */
.bv-mandant-wahl { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 14px; }
.bv-mandant-karte { display: flex; flex-direction: column; gap: 8px; padding: 18px; text-decoration: none; color: var(--ink); border: 2px solid transparent; }
.bv-mandant-karte b { font-size: 17px; }
.bv-mandant-karte .btn { align-self: flex-start; margin-top: 4px; }
.bv-mandant-karte:hover { border-color: var(--red); }
.bv-mandant-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 14px; }

/* Team-Postfach: lange Betreffzeilen und Adresslisten umbrechen statt über den Bildschirm hinauszuragen */
.mp-liste .row-link, .mp-liste td small { overflow-wrap: anywhere; }
.mp-kopf dd { overflow-wrap: anywhere; min-width: 0; }
.mp-d-zeile span b { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
@media (max-width: 700px) {
    .mp-dialog-info { white-space: normal; overflow-wrap: anywhere; }
    .tk-layout { min-width: 0; }
    .tk-layout > div { min-width: 0; }
}

/* Team-Postfach: Hinweis auf neue Mails nach dem Hintergrund-Abruf */
.mp-neu-hinweis { position: fixed; z-index: 60; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(0, 0, 0, .2); }
.mp-neu-hinweis[hidden] { display: none; }

/* Modul Infoticker */
.it-form .it-breit { grid-column: 1 / -1; }
.it-ziel { display: flex; flex-wrap: wrap; gap: 8px; }
.it-ziel select { flex: 1 1 220px; }
.it-ziel select[hidden] { display: none; }
.it-push { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: var(--radius); }
.it-liste td small { overflow-wrap: anywhere; }
@media (max-width: 700px) { .it-form .edit-grid { grid-template-columns: 1fr; } }

/* Modul Checklisten */
.cl-breit { grid-column: 1 / -1; }
.cl-schritte { table-layout: fixed; }
.cl-schritte td input, .cl-schritte td select { width: 100%; min-width: 0; padding: 7px 9px; font-size: 13px; }
.cl-schritte .cl-hinweis { margin-top: 4px; font-size: 12px; }
.cl-schritte .actions { white-space: nowrap; }
.cl-schritte .cl-neu td { background: #fafbfc; }
.cl-listenname { margin: 10px 0 2px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cl-zeile { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.cl-sym { flex: 0 0 22px; text-align: center; font-weight: 800; }
.cl-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cl-text small { overflow-wrap: anywhere; }
.cl-zeile.st-faellig { background: var(--red-soft); }
.cl-zeile.st-faellig .cl-sym { color: var(--red); }
.cl-zeile.st-erledigt .cl-sym { color: var(--green); }
.cl-zeile.st-erledigt b, .cl-zeile.st-entfaellt b { font-weight: 500; color: var(--muted); }
.cl-knoepfe { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 1000px) { .cl-schritte { table-layout: auto; } }
@media (max-width: 700px) { .cl-zeile { flex-wrap: wrap; } .cl-knoepfe { flex-basis: 100%; justify-content: flex-start; } }
/* Checklisten: Abfragen beim Abhaken (Modul und Einsatz) */
.cl-abfrage { position: relative; }
.cl-abfrage > summary { list-style: none; cursor: pointer; }
.cl-abfrage > summary::-webkit-details-marker { display: none; }
.cl-abfrage-form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: min(380px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 10px;
    padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(0, 0, 0, .18); }
.cl-feld { display: flex; flex-direction: column; gap: 4px; margin: 0; font-weight: 400; }
.cl-frage { font-weight: 600; font-size: 13px; }
.cl-pflicht { color: var(--red); }
.cl-janein { display: flex; gap: 16px; }
.cl-janein label { display: inline-flex; gap: 6px; align-items: center; margin: 0; font-weight: 400; }
@media (max-width: 700px) { .cl-abfrage-form { position: static; width: 100%; margin-top: 6px; } }

/* Sichter: Checkliste je Einsatz */
.si-cl { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.si-cl > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 12px; cursor: pointer; list-style: none; }
.si-cl > summary::-webkit-details-marker { display: none; }
.si-cl > summary::after { content: '▾'; margin-left: auto; color: var(--muted); }
.si-cl[open] > summary::after { content: '▴'; }
.si-cl.hat-faellig { border-color: var(--red); }
.si-cl-stand { font-size: 13px; color: var(--muted); }
.si-cl-inhalt { padding: 0 12px 10px; }

/* Checklisten-Stand als Tabelle: Status · Schritt · Angaben · Zeit · Erledigt von · Aktionen */
.cl-tabelle .cl-zeile { display: grid; grid-template-columns: 26px minmax(160px, 1.3fr) minmax(170px, 1.5fr) minmax(110px, .8fr) minmax(120px, .9fr) auto; gap: 6px 14px; align-items: center; }
.cl-tabelle .cl-kopf { padding: 4px 0; border-top: 0; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cl-angaben { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cl-angabe { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 2px 8px; border-radius: 4px; background: var(--bg); font-size: 13px; }
.cl-angabe span { color: var(--muted); overflow-wrap: anywhere; }
.cl-angabe b { text-align: right; overflow-wrap: anywhere; }
.cl-angabe.offen b { color: var(--muted); font-weight: 400; }
.cl-zeit, .cl-von { min-width: 0; overflow-wrap: anywhere; }
.cl-tabelle .cl-knoepfe { justify-content: flex-end; }
@media (max-width: 900px) {
    .cl-tabelle .cl-zeile { grid-template-columns: 26px minmax(0, 1fr); }
    .cl-tabelle .cl-kopf { display: none; }
    .cl-tabelle .cl-zeile > :not(.cl-sym) { grid-column: 2; }
    .cl-tabelle .cl-zeit::before, .cl-tabelle .cl-von::before { content: attr(data-label) ': '; color: var(--muted); }
    .cl-tabelle .cl-knoepfe { justify-content: flex-start; }
}

.cl-durchgang { display: flex; flex-direction: column; gap: 3px; padding-bottom: 4px; }
.cl-durchgang + .cl-durchgang { padding-top: 4px; border-top: 1px dashed var(--line); }
.cl-durchgang-kopf { font-size: 11px; font-weight: 700; color: var(--muted); }

/* Checklisten-Pflege: Schritt-Karten mit ihren Abfragen */
.cl-pflege-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.cl-pflege-kopf h3 { margin: 0; }
.cl-schritt-karte { padding: 12px 14px; margin-top: 10px; }
.cl-schritt-karte.ist-neu { background: #fafbfc; border-style: dashed; }
.cl-schritt-zeile { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
.cl-schritt-nr { flex: 0 0 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--red); color: #fff; font-weight: 700; align-self: center; }
.cl-schritt-felder { flex: 1 1 320px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cl-schritt-felder .cl-titel { font-weight: 600; }
.cl-schritt-felder .cl-hinweis { font-size: 13px; padding: 6px 10px; }
.cl-klein { display: flex; flex-direction: column; gap: 2px; margin: 0; font-size: 11px; font-weight: 600; color: var(--muted); }
.cl-klein input, .cl-klein select { width: 110px; padding: 6px 8px; font-size: 13px; }
.cl-klein select { width: 190px; }
.cl-schritt-knoepfe { display: flex; gap: 6px; }
.cl-feld-liste { margin: 10px 0 0 40px; padding: 8px 10px; border-left: 3px solid var(--line); background: var(--bg); border-radius: 0 var(--radius) var(--radius) 0; }
.cl-feld-titel { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.cl-feld-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 4px 0; }
.cl-feld-zeile input[name="frage"] { flex: 1 1 220px; min-width: 0; }
.cl-feld-zeile input[name="optionen"] { flex: 1 1 180px; min-width: 0; }
.cl-feld-zeile input, .cl-feld-zeile select { padding: 6px 8px; font-size: 13px; }
.cl-feld-zeile select { width: 120px; }
.cl-feld-zeile input[name="sort"] { width: 64px; flex: 0 0 64px; }
.cl-feld-zeile .check { margin: 0; font-size: 13px; }
.cl-feld-zeile.ist-neu input[name="frage"] { border-style: dashed; }
.cl-feld-zeile [hidden] { display: none; }
@media (max-width: 700px) { .cl-feld-liste { margin-left: 0; } .cl-klein input, .cl-klein select { width: 100%; } .cl-klein { flex: 1 1 40%; } }
/* Checklisten-Tabelle: gleiche Spaltenbreiten in allen Zeilen (feste Breiten für Zeit, Person, Aktionen) und oben bündig */
.cl-tabelle .cl-zeile { grid-template-columns: 26px minmax(0, 1.2fr) minmax(0, 1.7fr) 170px 190px 250px; align-items: start; }
.cl-tabelle .cl-zeile > span { padding-top: 3px; }
.cl-tabelle .cl-kopf { align-items: end; }
.cl-tabelle .cl-knoepfe { padding-top: 0 !important; justify-content: flex-end; align-self: start; }
.cl-tabelle .cl-angaben > .muted, .cl-tabelle .cl-zeit > .muted, .cl-tabelle .cl-von > .muted { display: inline-block; }
.cl-tabelle .cl-durchgang:first-child { padding-top: 0; }
@media (max-width: 1200px) { .cl-tabelle .cl-zeile { grid-template-columns: 26px minmax(0, 1.2fr) minmax(0, 1.5fr) 140px 150px 220px; } }
@media (max-width: 900px) { .cl-tabelle .cl-zeile { grid-template-columns: 26px minmax(0, 1fr); } }

.auto-abschluss { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.auto-abschluss legend { padding: 0 4px; font-weight: 600; }

/* Hinweis „Zum Beenden noch einmal Zurück“ (App, Android) */
.fez-toast { position: fixed; left: 50%; bottom: 24px; z-index: 3000; transform: translate(-50%, 20px); padding: 10px 16px; border-radius: 20px;
    background: rgba(28, 31, 36, .92); color: #fff; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.fez-toast.an { opacity: 1; transform: translate(-50%, 0); }

.ph-sensibel td:first-child code { color: var(--red-dark); font-weight: 700; }
.ph-hinweis { grid-column: 1 / -1; margin: 6px 0 0; }

/* Mail-Verteiler: großer Text-Editor (ohne Scrollen) */
.empf-text { display: flex; flex-direction: column; gap: 4px; }
.empf-text .mail-editor .me-feld { min-height: 26em; max-height: none; resize: vertical; overflow: auto; }

/* Mandant › Mailversand: Versandweg SMTP / Microsoft 365 */
.versand-wahl { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); }
[data-versand-fuer][hidden] { display: none !important; }

/* Ticketsystem: Sammelaktionen (archivieren, zurückholen, löschen) */
.tk-sammel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border-top: 1px solid var(--line); background: var(--bg-soft, transparent); }
.tk-sammel[hidden] { display: none; }
.tk-wahl { width: 32px; text-align: center; }

/* Nummernkreis › AME-Berichtsgruppen: Stichwortgruppen per Klick verknüpfen */
.ame-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.ame-chips .chip { padding: 2px 8px; font-size: .8rem; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; }
.ame-chips .chip.an { border-color: var(--red); background: var(--red-soft); color: var(--ink); font-weight: 600; }
.warn-row td { background: var(--red-soft); }

/* ---------- Tablet (z. B. iPad mini 744 px hochkant / 1133 px quer) ---------- */
/* Tabellen in einem wischbaren Rahmen (assets/js/tabellen.js) – nichts läuft mehr über den Bildschirmrand */
.table-scroll { max-width: 100%; }
@media (max-width: 1180px) {
    .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table-scroll:has(details[open]), .table-scroll:has(.ticker-pop) { overflow: visible; } /* Aufklapp-Menüs nicht abschneiden */
    .table-scroll.mehr-rechts { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), rgba(0, 0, 0, .25));
                                mask-image: linear-gradient(to right, #000 calc(100% - 28px), rgba(0, 0, 0, .25)); }
    .table-scroll .actions { white-space: nowrap; }
    /* Kopfzeile: Admin-Schalter ohne umbrechenden Untertext, weniger Abstand */
    .topbar { gap: 16px; padding: 0 16px; }
    .switch-label small { display: none; }
    .switch-label b { white-space: nowrap; }
    .admin-switch { padding: 4px 10px 4px 5px; }
}
@media (max-width: 1000px) {
    .topbar .clock { display: none; }
    .topbar .user { display: inline-block; white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
}

/* „Ändern“-Formulare in Listen auf Tablet und Handy: Beschriftung oben, Felder in voller Breite (iOS-Datumsfelder mit Rahmen) */
@media (max-width: 1180px) {
    td .menu[open] > .menu-list { text-align: left; white-space: normal; }
    .menu-list label { display: block; margin: 0 0 10px; font-weight: 700; font-size: 13px; text-align: left; }
    .menu-list label input, .menu-list label select, .menu-list label textarea { margin-top: 4px; font-weight: 400; }
    .menu-list input:not([type=checkbox]):not([type=radio]):not([type=hidden]), .menu-list select, .menu-list textarea {
        display: block; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
    .menu-list input[type=datetime-local], .menu-list input[type=date], .menu-list input[type=time] {
        -webkit-appearance: none; appearance: none; min-height: 44px; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--ink);
        text-align: left; border: 1px solid #cfd4da; border-radius: var(--radius); background: #fff; }
    .menu-list input::-webkit-date-and-time-value { text-align: left; }
    .menu-list form p { margin: 4px 0 0; }
    .menu-list form + form { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
    .menu-list .btn { width: 100%; justify-content: center; }
    .ze-zuordnen select { min-width: 170px; }
}
/* Tablet: das Formular erscheint als Fenster in der Bildschirmmitte statt am (abgeschnittenen) rechten Tabellenrand */
@media (min-width: 701px) and (max-width: 1180px) {
    td .menu[open] > .menu-list { position: fixed; left: 50%; top: 50%; right: auto; transform: translate(-50%, -50%); z-index: 120;
                                  width: min(440px, calc(100vw - 48px)); min-width: 0; max-height: calc(100vh - 80px); overflow-y: auto;
                                  padding: 18px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35), 0 20px 50px rgba(0, 0, 0, .3); }
    .table-scroll:has(details[open]) { -webkit-mask-image: none; mask-image: none; }
}

/* Meine Zeiten › Tickets: zugeordnete Tickets je Zeit und Auswahlfenster */
.zt-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.zt-chips { flex-direction: column; align-items: flex-start; }
.zt-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; text-decoration: none; color: var(--ink); background: #fff; }
.zt-chip:hover { border-color: var(--red); }
.zt-chip-nr { font-weight: 700; white-space: nowrap; }
.zt-chip-titel { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zt-chip .pill { flex-shrink: 0; }
/* Meine Zeiten: alle Zellen oben bündig */
.ze-tabelle td { vertical-align: top; }
.ze-tabelle td.actions { white-space: normal; }
.zt-chip .pill { font-size: 10px; padding: 0 6px; }
.zt-knopf { margin-top: 6px; }
.zt-form input[type=search] { margin: 6px 0 4px; }
.zt-liste { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 12px; }
.zt-ticket { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; background: #fff; }
.zt-ticket[hidden] { display: none; }
.zt-ticket:has([data-zt-wahl]:checked) { border-color: var(--red); background: var(--red-soft); }
.zt-kopf { display: flex; align-items: flex-start; gap: 8px; margin: 0; cursor: pointer; }
.zt-kopf small { display: block; }
.zt-felder { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); display: grid; gap: 6px; }
.zt-felder[hidden] { display: none; }
.zt-felder label:not(.check) { display: block; font-weight: 700; font-size: 13px; }
.zt-felder select, .zt-felder textarea { display: block; width: 100%; margin-top: 4px; font-weight: 400; }

/* Stechuhr: Beschreibung, Zwischenspeichern und Tickets (Startseite und Meine Zeiten) */
.stechuhr-form textarea { flex: 1 1 100%; min-height: 60px; }
.stechuhr-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 100%; }
.stechuhr-knoepfe .btn-primary { margin-left: auto; }
.stechuhr-form .zt-chips { flex: 1 1 100%; margin-top: 0; }
.ze-beschreibung { margin-top: 4px; font-size: 12px; color: var(--muted); white-space: normal; max-height: 7.5em; overflow: auto; }
@media (max-width: 700px) {
    .stechuhr-knoepfe .btn { flex: 1 1 100%; margin-left: 0; }
}

/* Team-Postfach (PC/Tablet): nur die Mail-Liste scrollt – Überschrift, Suche, Reiter, Postfach-Auswahl und Auswahl-Leiste bleiben stehen */
@media (min-width: 701px) {
    .content:has(> .mp-panel) { display: flex; flex-direction: column; overflow: hidden; }
    .content:has(> .mp-panel) > * { flex-shrink: 0; }
    .content > .mp-panel { flex: 1 1 auto; min-height: 280px; display: flex; flex-direction: column; overflow: hidden; margin-bottom: 0; }
    .mp-panel > .mp-liste-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
    .mp-panel .mp-sammel-leiste { position: static; }
    .mp-liste-scroll .mp-liste thead th { position: sticky; top: 0; z-index: 3; background: var(--panel, #fff); box-shadow: inset 0 -1px 0 var(--line); }
}

/* Modul Feuerwehr: Sonderbeladung mit Inhalt in der Fahrzeugliste */
.fw-fahrzeuge td { vertical-align: top; }
.fw-beladung { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.fw-beladung li { padding: 3px 0 3px 10px; border-left: 3px solid var(--line); line-height: 1.35; }
.fw-menge { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 999px; background: #eef2f7; font-size: 12px; font-weight: 700; white-space: nowrap; }
/* Ressourcen-Formular: Telefonbuch-Feld entfällt bei zugeordneter Wehr */
#res-form [data-ohne-wehr][hidden], #res-form [data-mit-wehr][hidden] { display: none !important; }
/* Wehr › Adresse: Felder entfallen bei verknüpftem Telefonbuch-Eintrag */
[data-ohne-kontakt][hidden], [data-mit-kontakt][hidden] { display: none !important; }
/* Ressourcen-Formular: Adressfelder entfallen bei verknüpftem Telefonbuch-Eintrag */
#res-form .res-aus-kontakt { display: none !important; }

/* Ressourcen/Sonderbeladung: Bemerkung als wichtiger Hinweis hervorgehoben */
.res-bemerkung { display: block; margin-top: 4px; padding: 4px 8px; border-left: 4px solid #e0a800; border-radius: 4px; background: #fff4cc; color: #5c4400; font-size: 12px; font-weight: 600; white-space: normal; overflow-wrap: anywhere; }

/* Allgemein (PC/Tablet): Kopf einer Liste bleibt stehen, nur .liste-scroll scrollt (wie im Team-Postfach).
   Seite: <section class="panel liste-kopf">Filter …</section><div class="liste-scroll"><section class="panel liste-koerper">Tabelle</section> …</div> */
@media (min-width: 701px) {
    .content:has(> .liste-scroll) { display: flex; flex-direction: column; overflow: hidden; }
    .content:has(> .liste-scroll) > * { flex-shrink: 0; }
    .content > .liste-scroll { flex: 1 1 auto; min-height: 240px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
                               margin: 0 -6px; padding: 0 6px 16px; }
    .content > .liste-kopf { margin-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: 0; }
    .liste-scroll > .liste-koerper:first-child { border-top-left-radius: 0; border-top-right-radius: 0; }
    .liste-koerper .table thead th { position: sticky; top: 0; z-index: 3; background: var(--panel, #fff); box-shadow: inset 0 -1px 0 var(--line); }
}

/* Telefonbuch (PC/Tablet): Suche, Tags, Reiter und Auswahl-Leiste bleiben stehen – nur die Kontaktliste scrollt */
@media (min-width: 701px) {
    .content:has(> #tb-results) { display: flex; flex-direction: column; overflow: hidden; }
    .content:has(> #tb-results) > * { flex-shrink: 0; }
    .content > #tb-results { flex: 1 1 auto; min-height: 260px; display: flex; flex-direction: column; }
    #tb-results > .tab-box { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; margin-bottom: 0; }
    #tb-results > .tab-box > .tabs { flex-shrink: 0; }
    #tb-results > .tab-box > .panel { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; margin-bottom: 0; }
    #tb-results > .tab-box > .panel > * { flex-shrink: 0; }
    #tb-results .panel > .tb-liste-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
    #tb-results .tb-sammel-leiste { position: static; }
    .tb-liste-scroll .tb-list thead th { position: sticky; top: 0; z-index: 3; background: var(--panel, #fff); box-shadow: inset 0 -1px 0 var(--line); }
}

/* Einsatz › Objekt: Einsatzdokumente (Ordner auf der NAS) */
.od-browser h4 { margin: 0 0 8px; }
.od-browser.od-laedt { opacity: .5; pointer-events: none; }
.od-suche { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.od-suche input[type=search] { flex: 1 1 260px; }
.od-pfad { font-size: 13px; margin-bottom: 6px; overflow-wrap: anywhere; }
.od-pfad a { text-decoration: none; }
.od-liste td { vertical-align: top; }
.od-liste a { text-decoration: none; color: var(--ink); }
.od-liste a:hover { color: var(--red); text-decoration: underline; }
.green { color: #17692f; }
.od-hinweis { margin: -2px 0 8px; font-size: 11px; color: var(--muted); }
.od-hinweis code { font-size: 11px; }

/* Einsatz › Anforderungen/Nachrichten (Tablets ↔ Arbeitsplätze) */
.anf-web { padding: 10px 12px; margin-bottom: 10px; border: 1px solid var(--line); border-left: 5px solid #f59e0b; border-radius: var(--radius); background: #fff; }
.anf-web.ist-nachricht { border-left-color: #3b82f6; }
.anf-web.st-storniert { opacity: .6; }
.anf-web.st-eingetroffen { border-left-color: #2fb35a; }
.anf-web-kopf { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 4px; }
.anf-web-log { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; }
.anf-web-knoepfe { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.si-zeile:has(.si-tablets) { grid-template-columns: 1.3fr 1fr 1fr 1.4fr auto; }
@media (max-width: 900px) { .si-zeile:has(.si-tablets) { grid-template-columns: 1fr; } }

/* Datei-Browser: Kachelansicht mit Miniaturen (Einsatzdokumentation, umschaltbar) */
.od-ansicht-wahl { display: flex; gap: 4px; margin: 4px 0 8px; }
.od-ansicht-wahl a { padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; color: var(--ink); font-size: 13px; }
.od-ansicht-wahl a.an { border-color: var(--red); background: var(--red-soft); color: var(--red-dark); font-weight: 700; }
.od-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.od-kachel { display: flex; flex-direction: column; gap: 3px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); background: var(--panel); min-width: 0; }
.od-kachel:hover { border-color: var(--red); }
.od-k-bild { display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 4 / 3; border-radius: 6px; background: var(--bg); font-size: 44px; line-height: 1; overflow: hidden; }
.od-k-bild small { font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 6px; letter-spacing: .04em; }
.od-k-bild.mit-bild { background: #e9edf2; }
.od-k-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.od-k-name { font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.od-k-info { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.od-kachel-ordner .od-k-bild { background: #fff8dc; }
.od-k-bild canvas { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; background: #fff; }
/* Telefonbuch: Tag-Filter als Mehrfachauswahl */
.tb-tagbar .tb-tag-multi { min-width: 240px; }
.tb-tag-multi .multi-option { gap: 6px; }
.tb-tagmodus { display: flex; margin: 8px 4px 2px; padding-top: 8px; border-top: 1px solid var(--line); }
.tb-tag-link.active { text-decoration: none; }

/* Mail-Ansicht: Papierkorb nur in der Handy-Leiste; Handy: Aktionen als feste Symbolleiste unten */
.mp-ak-weg { display: none; }
@media (max-width: 700px) {
    .mp-nur-pc { display: none; }
    .tk-layout .mp-aktionsleiste { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; flex-wrap: nowrap; gap: 4px; justify-content: space-around;
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-radius: 0; border-top: 1px solid var(--line); border-bottom: 0;
        background: var(--panel); box-shadow: 0 -4px 16px rgba(0, 0, 0, .12); }
    .tk-layout .mp-aktionsleiste .btn { flex: 1 1 0; min-width: 0; height: 48px; padding: 0; font-size: 22px; display: flex; align-items: center; justify-content: center; }
    .tk-layout .mp-aktionsleiste .mp-ak-text { display: none; }
    .tk-layout .mp-aktionsleiste .mp-ak-weg { display: flex; flex: 1 1 0; margin-left: auto; }
    .tk-layout .mp-aktionsleiste .mp-ak-weg .btn { width: 100%; color: var(--red-dark); }
    /* Platz für die Leiste, damit das Ende der Mail nicht verdeckt wird */
    .tk-layout:has(.mp-aktionsleiste) { padding-bottom: 76px; }
}

/* Team-Postfach: Strich-Symbole (SVG) statt Emojis */
.mp-svg { width: 18px; height: 18px; vertical-align: -3px; flex-shrink: 0; }
.mp-ak-sym { display: inline-flex; }
.mp-wichtig-an .mp-svg { color: #e0a800; }
.mp-unten { display: none; }
@media (max-width: 700px) {
    .tk-layout .mp-aktionsleiste .mp-svg { width: 24px; height: 24px; }
    /* Kopf der Mail: nur Symbole, nichts ragt aus dem Bildschirm */
    .page-actions .mp-kopf-knopf { width: 48px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
    .page-actions .mp-kopf-knopf .mp-ak-text { display: none; }
    .page-actions .mp-kopf-knopf .mp-svg { width: 22px; height: 22px; }
    /* Liste: Ansichten und „Neu“ als feste Leiste unten */
    .mp-seg-unten { display: none; }
    .mp-unten { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; justify-content: space-around; align-items: stretch;
        padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0, 0, 0, .12); }
    .mp-unten a { position: relative; flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px;
        text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 700; border-radius: 10px; }
    .mp-unten a .mp-svg { width: 24px; height: 24px; }
    .mp-unten a.an { color: var(--red-dark); background: var(--red-soft); }
    .mp-unten a.mp-unten-neu { color: #fff; background: var(--red); margin: 0 4px; }
    .mp-unten-zahl { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff;
        font-size: 11px; line-height: 18px; text-align: center; }
    .mp-panel { margin-bottom: 76px; }
    /* Postfach-Filter: als Fenster in Bildschirmbreite statt seitlich herausragend */
    .mp-pf-filter .mp-pf-auswahl, .mp-rechts .mp-pf-auswahl { position: fixed; left: 12px; right: 12px; top: 72px; width: auto; max-height: calc(100vh - 170px); z-index: 70; }
    .mp-pf-filter > summary { max-width: calc(100vw - 32px); }
}

/* Team-Postfach mobil: Such- und Filterbereich aufgeräumt – Suche oben, darunter Ordner + Postfach-Filter, dann Ticket/Anhang */
@media (max-width: 700px) {
    .mp-filterleiste { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 10px 12px; align-items: center; }
    .mp-filterleiste .mp-suche { grid-column: 1 / -1; order: 0; min-width: 0; }
    .mp-filterleiste .mp-suche input[type="search"] { height: 44px; font-size: 16px; border-radius: 10px; } /* 16 px: kein Zoom beim Antippen (iOS) */
    .mp-filterleiste .mp-ordner-wahl { display: flex; gap: 6px; min-width: 0; grid-column: 1; }
    .mp-filterleiste .mp-ordner-wahl select { flex: 1 1 auto; min-width: 0; height: 40px; border-radius: 10px; font-size: 15px; }
    .mp-filterleiste .mp-ordner-wahl .btn { height: 40px; white-space: nowrap; }
    .mp-filterleiste .mp-pf-filter { grid-column: 2; }
    .mp-filterleiste .mp-pf-filter > summary { height: 40px; display: flex; align-items: center; border-radius: 10px; max-width: 46vw; }
    .mp-filterleiste:not(:has(.mp-ordner-wahl)) .mp-pf-filter { grid-column: 1 / -1; }
    .mp-filterleiste .seg { grid-column: 1 / -1; justify-self: start; }
    .mp-filterleiste .seg a { padding: 8px 14px; font-size: 13px; }
}

/* Handy: obere Leiste passt immer in die Breite – Logo schrumpft mit, kein seitliches Verschieben der Seite */
@media (max-width: 700px) {
    .topbar { min-width: 0; max-width: 100vw; }
    .topbar > * { flex-shrink: 0; }
    .topbar-logo { flex: 0 1 auto; min-width: 0; overflow: hidden; }
    .topbar-logo img { height: auto; max-height: 28px; max-width: 100%; object-fit: contain; object-position: right center; }
    .topbar .link-red { font-size: 14px; white-space: nowrap; }
    /* Sicherheitsnetz: nichts darf die Seite breiter als den Bildschirm machen (clip statt hidden – „sticky“ bleibt wirksam) */
    html, body { overflow-x: clip; }
    .content { min-width: 0; max-width: 100vw; }
}
@media (max-width: 380px) {
    .topbar { gap: 6px; padding: 0 8px; }
    .topbar-logo { padding-left: 6px; }
}
/* Modul-Symbole: Suche in der Auswahl */
.icon-suche { max-width: 360px; margin: 4px 0 8px; }
.icon-picker label[hidden] { display: none; }
/* Problem melden: Art wählen (Problem / Idee) */
.sp-art { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.sp-art label { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 700; }
.sp-art label:has(input:checked) { border-color: var(--red); background: var(--red-soft); color: var(--red-dark); }
.sp-art input { margin: 0; }
#sp-dringend[hidden] { display: none; }

/* Filterleiste: Chip-Container ist am PC „unsichtbar“ (Elemente stehen wie bisher in der Leiste: Ordner · Suche · Ansichten · Postfächer) */
.mp-chips { display: contents; }
.mp-filterleiste .mp-ordner-wahl { order: -1; }
/* Team-Postfach mobil im Messenger-Stil (WhatsApp-ähnlich): großer Titel mit runden Knöpfen, Suche als Pille,
   Filter als wischbare Chips, schwebende Leiste unten mit Milchglas – gilt für Liste und geöffnete Mail */
.mp-rund .mp-svg { margin-right: 2px; }
@media (max-width: 700px) {
    /* Kopf: großer Titel links, runde Knöpfe rechts */
    .mp-liste-kopf { display: flex; flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 10px; }
    .mp-liste-kopf h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 0; }
    .mp-liste-kopf > div:first-child p { display: none; }
    .mp-liste-kopf .page-actions { flex: 0 0 auto; flex-wrap: nowrap; overflow: visible; gap: 8px; padding: 0; margin: 0; }
    .page-actions .mp-rund { flex: 0 0 auto; width: 46px; height: 46px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
        background: var(--panel); border: 1px solid var(--line); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); color: var(--ink); }
    .page-actions .mp-rund .mp-svg { width: 22px; height: 22px; margin: 0; }
    .page-actions .mp-rund .mp-rund-text { display: none; }
    .page-actions .mp-rund-neu { background: #1c1f24; border-color: #1c1f24; color: #fff; }
    .page-actions .mp-rund-neu .mp-svg { width: 26px; height: 26px; }

    /* Suche als graue Pille, darunter eine wischbare Chip-Reihe */
    .mp-panel { background: transparent; border: 0; box-shadow: none; }
    .mp-filterleiste { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
        padding: 4px 0 10px; border: 0; align-items: center; }
    .mp-filterleiste::-webkit-scrollbar { display: none; }
    .mp-filterleiste .mp-suche { order: -1; flex: 0 0 100%; min-width: 0; max-width: none; }
    .mp-filterleiste:has(.mp-suche) { flex-wrap: wrap; overflow: visible; }
    .mp-filterleiste .mp-suche input[type="search"] { height: 42px; border: 0; border-radius: 21px; background: #eceef1; padding: 0 16px; font-size: 16px; }
    .mp-filterleiste > .mp-ordner-wahl, .mp-filterleiste > .mp-pf-filter, .mp-filterleiste > .seg { flex: 0 0 auto; }
    .mp-chips { display: flex; flex: 0 0 100%; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; width: 100%; padding-bottom: 2px; }
    .mp-filterleiste .mp-ordner-wahl { order: 0; display: flex; gap: 8px; flex: 0 0 auto; }
    .mp-chips::-webkit-scrollbar { display: none; }
    /* Chips: Ordner-Auswahl, Postfach-Filter, Ticket, Anhang – alle als runde Pillen */
    .mp-filterleiste .mp-ordner-wahl select, .mp-filterleiste .mp-ordner-wahl .btn, .mp-filterleiste .mp-pf-filter > summary,
    .mp-filterleiste .seg a { height: 38px; display: inline-flex; align-items: center; padding: 0 16px; border: 1px solid #d5d9df; border-radius: 19px;
        background: var(--panel); color: var(--ink); font-size: 15px; font-weight: 600; white-space: nowrap; max-width: none; }
    .mp-filterleiste .mp-ordner-wahl select { width: auto; max-width: 60vw; padding-right: 30px; }
    .mp-filterleiste .seg { display: flex; gap: 8px; border: 0; background: transparent; overflow: visible; border-radius: 0; }
    .mp-filterleiste .seg a { border-left: 1px solid #d5d9df; }
    .mp-filterleiste .seg a.active, .mp-filterleiste .mp-pf-filter > summary.mp-pf-aktiv, .mp-filterleiste .mp-ordner-wahl select.mp-pf-aktiv {
        background: #e3e5e9; border-color: #c9cdd3; color: var(--ink); }

    /* Schwebende Leiste unten (Liste und geöffnete Mail): abgerundet, Milchglas, aktive Ansicht grau hinterlegt */
    .mp-unten, .tk-layout .mp-aktionsleiste { left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 6px; border: 1px solid rgba(0, 0, 0, .06);
        border-radius: 34px; background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
        box-shadow: 0 8px 28px rgba(0, 0, 0, .16); }
    .mp-unten a { min-height: 56px; border-radius: 28px; color: var(--ink); font-size: 12px; font-weight: 600; }
    .mp-unten a.an { background: rgba(0, 0, 0, .08); color: var(--ink); }
    .mp-unten-sym { position: relative; display: inline-flex; }
    .mp-unten a .mp-svg { width: 26px; height: 26px; }
    .mp-unten-zahl { top: -8px; left: auto; right: -14px; min-width: 22px; height: 22px; border-radius: 11px; line-height: 22px; font-size: 12px; border: 2px solid #fff; }
    .tk-layout .mp-aktionsleiste .btn { height: 52px; border-radius: 26px; border: 0; background: transparent; color: var(--ink); }
    .tk-layout .mp-aktionsleiste .btn-primary { background: rgba(0, 0, 0, .08); color: var(--ink); }
    .tk-layout .mp-aktionsleiste .mp-ak-weg .btn { color: var(--red-dark); }
    .mp-panel { margin-bottom: 96px; }
    .tk-layout:has(.mp-aktionsleiste) { padding-bottom: 96px; }
}

/* Team-Postfach mobil: Ordner und Postfächer als runde Knöpfe oben, Auswahl als Fenster von unten */
.mp-nur-mobil, .mp-sheet { display: none; }
@media (max-width: 700px) {
    /* Knöpfe in eigener Zeile über dem großen Titel (wie in Messenger-Apps) */
    .mp-liste-kopf { flex-direction: column-reverse; align-items: stretch; gap: 6px; }
    .mp-liste-kopf .page-actions { justify-content: flex-end; flex-wrap: wrap; }
    .page-actions .mp-rund.mp-nur-mobil { display: inline-flex; }
    .page-actions .mp-rund { position: relative; }
    .page-actions .mp-rund-aktiv::after { content: ''; position: absolute; top: 2px; right: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--red); border: 2px solid var(--panel); }
    /* Ordner-Auswahl und Postfach-Chip aus der Chip-Reihe nehmen */
    .mp-filterleiste .mp-chips .mp-ordner-wahl { display: none; }
    .mp-filterleiste .mp-chips .mp-pf-filter > summary { display: none; }
    /* Fenster von unten */
    .mp-sheet { display: flex; position: fixed; inset: 0; z-index: 80; align-items: flex-end; background: rgba(0, 0, 0, .35); }
    .mp-sheet[hidden] { display: none; }
    .mp-sheet-karte, .mp-filterleiste .mp-pf-filter[open] .mp-pf-auswahl {
        width: 100%; max-height: 75vh; overflow: auto; background: var(--panel); border-radius: 18px 18px 0 0;
        padding: 6px 16px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 30px rgba(0, 0, 0, .2); }
    .mp-filterleiste .mp-pf-filter[open] .mp-pf-auswahl { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 81; gap: 10px; }
    .mp-filterleiste .mp-pf-filter[open]::before { content: ''; position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .35); }
    .mp-pf-auswahl label.check { padding: 8px 0; font-size: 16px; border-bottom: 1px solid var(--line); }
    .mp-sheet-kopf { display: flex; align-items: center; justify-content: space-between; padding: 8px 0 10px; font-size: 18px; position: sticky; top: -6px; background: var(--panel); }
    .mp-sheet-zu { width: 40px; height: 40px; border: 0; border-radius: 50%; background: #eceef1; font-size: 18px; cursor: pointer; }
    .mp-sheet-zeile { display: block; padding: 14px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 17px; }
    .mp-sheet-zeile.an { font-weight: 700; color: var(--red-dark); background: var(--red-soft); border-radius: 10px; }
    .mp-sheet-knopf { margin-top: 12px; width: 100%; height: 46px; }
}

/* Postfach-Fenster (Handy): Zeilen mit großen Häkchen; der alte Filter in der Chip-Reihe ist am Handy ganz ausgeblendet */
@media (max-width: 700px) {
    .mp-filterleiste .mp-chips .mp-pf-filter { display: none; }
    .mp-sheet-karte { display: flex; flex-direction: column; gap: 4px; }
    .mp-sheet-wahl { display: flex; gap: 12px; align-items: center; margin: 0; padding: 12px 4px; border-bottom: 1px solid var(--line); font-weight: 400; cursor: pointer; }
    .mp-sheet-wahl input { width: 22px; height: 22px; flex-shrink: 0; margin: 0; }
    .mp-sheet-wahl span { display: flex; flex-direction: column; min-width: 0; font-size: 16px; }
    .mp-sheet-wahl small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
    .mp-sheet .mp-pf-schnell { margin: 2px 0 6px; }
    .mp-sheet .mp-pf-gruppe { margin-top: 10px; }
}

/* Team-Postfach mobil: Titel links in der Knopf-Zeile, Suche weiß mit deutlichem Rahmen */
@media (max-width: 700px) {
    .mp-liste-kopf { flex-direction: row; align-items: center; flex-wrap: nowrap; gap: 8px; }
    .mp-liste-kopf > div:first-child { flex: 1 1 auto; min-width: 0; }
    .mp-liste-kopf h1 { font-size: 26px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .mp-liste-kopf .page-actions { flex: 0 0 auto; flex-wrap: nowrap; gap: 6px; justify-content: flex-end; }
    .mp-liste-kopf .page-actions .mp-rund { width: 42px; height: 42px; }
    .mp-liste-kopf .page-actions .mp-rund .mp-svg { width: 20px; height: 20px; }
    .mp-liste-kopf .page-actions .mp-rund-neu .mp-svg { width: 24px; height: 24px; }
    .mp-filterleiste .mp-suche input[type="search"] { background: #fff; border: 1.5px solid #c3c9d1; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); color: var(--ink); }
    .mp-filterleiste .mp-suche input[type="search"]:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); outline: none; }
}
@media (max-width: 380px) {
    .mp-liste-kopf h1 { font-size: 22px; }
    .mp-liste-kopf .page-actions { gap: 4px; }
    .mp-liste-kopf .page-actions .mp-rund { width: 38px; height: 38px; }
}

/* Leisten unten (Postfach): unter dem Menü und seiner Abdunklung (Menü 60, Abdunklung 55); immer hell – das Dashboard hat keinen Dunkelmodus,
   ein dunkler Hintergrund bei Android/iOS im Dunkelmodus machte die Symbole unlesbar */
@media (max-width: 700px) {
    .mp-unten, .tk-layout .mp-aktionsleiste { z-index: 50; background: rgba(255, 255, 255, .9); color: var(--ink); color-scheme: light; }
    .menu-offen .mp-unten, .menu-offen .tk-layout .mp-aktionsleiste { display: none; }
}

/* ---------- Modul „Dateien“: Datei-Explorer ---------- */
.da-explorer { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 70vh; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.da-explorer.da-laedt { opacity: .55; pointer-events: none; }
.da-baum { border-right: 1px solid var(--line); background: #f8f9fb; overflow: auto; max-height: 78vh; padding: 8px 4px; font-size: 13px; }
.da-baum-titel { padding: 4px 10px 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.da-baum ul { list-style: none; margin: 0; padding: 0; }
.da-baum ul ul { padding-left: 14px; }
.da-baum a { display: flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 6px; color: var(--ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.da-baum a:hover { background: #eceef1; }
.da-baum a.an { background: var(--red-soft); color: var(--red-dark); font-weight: 700; }
.da-baum a.da-wurzel { font-weight: 700; }
.da-pfeil { width: 12px; flex-shrink: 0; color: var(--muted); font-size: 10px; }
.da-inhalt { min-width: 0; display: flex; flex-direction: column; }
.da-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.da-pfadleiste { flex: 1 1 260px; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.da-pfadleiste a { text-decoration: none; color: var(--ink); font-weight: 600; }
.da-pfadleiste a:hover { color: var(--red); }
.da-suche { flex: 0 1 320px; }
.da-suche input[type=search] { width: 100%; }
.da-wahl { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.da-wahl a { padding: 5px 11px; text-decoration: none; color: var(--muted); font-size: 15px; }
.da-wahl a.an { background: var(--ink); color: #fff; }
.da-liste { margin: 0; }
.da-liste th a { color: inherit; text-decoration: none; }
.da-liste td { vertical-align: middle; }
.da-liste .da-sp-name a { color: var(--ink); text-decoration: none; }
.da-liste .da-sp-name a:hover { color: var(--red); }
.da-sym { display: inline-block; width: 24px; }
.da-dl { margin-left: 8px; opacity: 0; text-decoration: none; }
.da-liste tr:hover .da-dl { opacity: 1; }
.da-sp-datum { width: 150px; white-space: nowrap; } .da-sp-typ { width: 120px; } .da-sp-groesse { width: 90px; text-align: right; white-space: nowrap; }
.da-mobil-info, .da-nur-mobil { display: none; }
.da-kacheln { padding: 12px; }
.da-wurzel-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; padding: 14px; }
.da-wurzel-kachel { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); background: #fff8dc; }
.da-wurzel-kachel span { font-size: 34px; }
.da-wurzel-kachel small { color: var(--muted); }
.da-wurzel-kachel:hover { border-color: var(--red); }
dialog.da-vorschau { width: min(1200px, calc(100vw - 32px)); height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 12px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
dialog.da-vorschau[open] { display: flex; flex-direction: column; }
dialog.da-vorschau::backdrop { background: rgba(20, 24, 30, .6); }
.da-v-kopf { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.da-v-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.da-v-inhalt { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; background: #f1f3f6; }
.da-v-inhalt iframe { width: 100%; height: 100%; border: 0; }
.da-v-inhalt img { max-width: 100%; max-height: 100%; object-fit: contain; }
@media (max-width: 700px) {
    /* Handy: eine Spalte – Freigaben bzw. Ordnerinhalt; Baum ausgeblendet, „⬆“ und Pfadleiste zur Navigation */
    .da-explorer { display: block; min-height: 0; border-radius: 12px; }
    .da-baum { display: none; }
    .da-kopf { position: sticky; top: 56px; z-index: 5; background: var(--panel); }
    .da-hoch { width: 44px; height: 40px; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; }
    .da-pfadleiste { flex: 1 1 0; font-size: 15px; }
    .da-nur-mobil { display: inline; }
    .da-suche { flex: 1 1 100%; order: 3; }
    .da-suche input[type=search] { height: 42px; border-radius: 21px; padding: 0 16px; }
    .da-liste thead, .da-sp-datum, .da-sp-typ, .da-sp-groesse { display: none; }
    .da-liste td.da-sp-name { padding: 12px 10px; font-size: 16px; }
    .da-mobil-info { display: block; margin-left: 24px; color: var(--muted); font-size: 12px; }
    .da-dl { opacity: 1; float: right; }
    .da-kacheln { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); padding: 10px; }
    .da-wurzel-kacheln { grid-template-columns: 1fr; padding: 10px; }
}

/* Dateien: aktueller Ordnername nur am Handy */
.da-aktuell { display: none; }
@media (max-width: 700px) {
    .da-seitenkopf { flex-direction: row; align-items: center; justify-content: space-between; }
    .da-seitenkopf p { display: none; }
    .da-seitenkopf .page-actions { flex: 0 0 auto; }
    .da-kopf { position: static; padding: 10px; }
    .da-kopf .da-pfadleiste { display: none; }
    .da-aktuell { display: block; flex: 1 1 0; min-width: 0; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .da-wahl { flex: 0 0 auto; }
    .da-suche { margin-top: 2px; }
}
/* Dateien: gesperrte Dateien (Stufe 1), Auswahl für ZIP (Stufe 3) */
.da-gesperrt { color: var(--muted); cursor: not-allowed; }
span.od-kachel.da-gesperrt { opacity: .6; }
.da-sp-wahl { width: 34px; }
.da-auswahl { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 45; display: flex; align-items: center; gap: 10px; padding: 10px 14px;
    background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }
.da-auswahl[hidden] { display: none; }
.da-auswahl-zahl { font-weight: 700; white-space: nowrap; }
@media (max-width: 700px) { .da-auswahl { left: 12px; right: 12px; transform: none; bottom: calc(12px + env(safe-area-inset-bottom)); flex-wrap: wrap; } .da-liste .da-sp-wahl { display: table-cell; } }
/* Dateien: 🏠 zurück zur Übersicht der Freigaben */
a.da-baum-titel { display: block; text-decoration: none; }
a.da-baum-titel:hover { color: var(--red); }
.da-home { font-size: 16px; }
@media (max-width: 700px) { .da-home { width: 44px; height: 40px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; } }
/* Dateien: Schreiben (hochladen, Ordner, umbenennen, löschen) */
.da-schreib { display: inline-flex; gap: 6px; }
.da-zeile-aktionen { float: right; display: inline-flex; gap: 2px; opacity: 0; }
.da-liste tr:hover .da-zeile-aktionen { opacity: 1; }
.da-zeile-aktionen button { border: 0; background: none; padding: 2px 6px; border-radius: 6px; cursor: pointer; font-size: 15px; }
.da-zeile-aktionen button:hover { background: var(--red-soft); }
.da-explorer.da-drop-an { outline: 3px dashed var(--red); outline-offset: -6px; }
.da-meldung { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 60; max-width: calc(100vw - 32px); padding: 10px 18px; border-radius: 10px;
    background: #1d4f91; color: #fff; font-weight: 700; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.da-meldung.fehler { background: #b91c1c; }
.da-meldung[hidden] { display: none; }
@media (max-width: 700px) {
    .da-zeile-aktionen { opacity: 1; }
    .da-zeile-aktionen button { font-size: 18px; padding: 4px 8px; }
    .da-schreib { order: 2; flex: 1 1 100%; }
    .da-schreib .btn { flex: 1 1 0; height: 40px; }
}
/* Dateien › Freigaben: Formulare */
.da-freigabe-neu { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; }
.da-freigabe-neu label { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.da-freigabe-neu label.check { flex-direction: row; align-items: center; }
.da-freigabe-neu .da-pfad { flex: 1 1 360px; }
.da-vorschau-liste, ul.da-vorschau { margin: 10px 0 0; padding-left: 18px; }
/* Dateien › Persönliche Ordner: Benutzerauswahl mit Suche, Liste und Chips */
.da-benutzerwahl { flex: 1 1 100%; display: flex; flex-direction: column; gap: 6px; }
.da-feld-titel { font-weight: 700; font-size: 13px; }
.da-bw-liste { max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 8px; background: #fff; }
.da-bw-option { display: flex; align-items: center; gap: 8px; margin: 0; padding: 6px 8px; border-radius: 6px; font-weight: 400; cursor: pointer; }
.da-bw-option:hover { background: #f3f6fb; }
.da-bw-option:has(input:checked) { background: var(--red-soft); color: var(--red-dark); font-weight: 700; }
.da-bw-option[hidden] { display: none; }
.da-bw-option input { margin: 0; width: auto; }
.da-bw-gewaehlt { display: flex; flex-wrap: wrap; gap: 6px; min-height: 28px; align-items: center; }
.da-bw-chip { border: 1px solid var(--red); background: var(--red-soft); color: var(--red-dark); border-radius: 14px; padding: 3px 10px; font: inherit; font-size: 13px; cursor: pointer; }
/* Dateien › Liste: kleine Vorschau statt Symbol */
.da-sym.da-mini { width: 40px; height: 32px; margin-right: 8px; vertical-align: middle; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 4px; overflow: hidden; background: #eef1f4; border: 1px solid var(--line); }
.da-sym.da-mini img, .da-sym.da-mini canvas { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
@media (max-width: 700px) { .da-sym.da-mini { width: 48px; height: 38px; } }
/* Dateien › Kacheln: ✎/🗑 oben rechts */
.da-kacheln .od-kachel { position: relative; }
.da-k-aktionen { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.da-kacheln .od-kachel:hover .da-k-aktionen { opacity: 1; }
.da-k-aktionen button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); cursor: pointer; font-size: 14px; }
.da-k-aktionen button:hover { background: var(--red-soft); }
@media (max-width: 700px) { .da-k-aktionen { opacity: 1; } .da-k-aktionen button { width: 34px; height: 34px; } }
/* Dateien: feste Höhe – Kopf mit Suche/Knöpfen bleibt stehen, nur Liste/Kacheln und Ordnerbaum scrollen */
.da-explorer { height: var(--da-hoehe, 75vh); min-height: 320px; }
.da-explorer .da-baum { max-height: none; height: 100%; min-height: 0; }
.da-explorer .da-inhalt { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.da-explorer .da-kopf { flex: 0 0 auto; }
.da-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.da-scroll .da-liste thead th { position: sticky; top: 0; z-index: 1; background: var(--panel); box-shadow: 0 1px 0 var(--line); }
@media (max-width: 700px) {
    .da-explorer { display: flex; flex-direction: column; }
    .da-explorer .da-inhalt { flex: 1 1 auto; }
    .da-scroll { padding-bottom: 70px; } /* Platz für die Auswahl-Leiste bzw. Meldungen unten */
}
/* Dateien › Freigaben: ausgeblendete Felder wirklich ausblenden; Pfadfeld mit Ordnerauswahl */
.da-freigabe-neu [hidden] { display: none !important; }
.da-pfadwahl { display: flex; gap: 6px; width: 100%; }
.da-pfadwahl input { flex: 1 1 auto; min-width: 0; }
.da-pfadwahl .btn { flex: 0 0 auto; padding: 6px 10px; }
.da-ow-liste { display: flex; flex-direction: column; gap: 2px; max-height: 55vh; overflow: auto; margin: 10px 0; border: 1px solid var(--line); border-radius: 8px; padding: 4px; }
.da-ow-eintrag { text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 6px; font: inherit; cursor: pointer; }
.da-ow-eintrag:hover { background: #f3f6fb; }
.da-ow-hoch { color: var(--muted); }
/* Dateien › Freigaben: Mehrfachauswahl und Chips je Ordner */
.da-feld { display: flex; flex-direction: column; gap: 4px; min-width: 260px; }
.da-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.da-chip { border: 1px solid #c9d6ea; background: #eef3fb; color: #1d4f91; border-radius: 14px; padding: 3px 10px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.da-chip:hover { border-color: var(--red); background: var(--red-soft); color: var(--red-dark); }
.da-dazu select { width: 100%; font-size: 13px; padding: 4px 6px; }
/* Dateien: Suche mit „nur Dateien“; Handy: nichts breiter als der Bildschirm (lange Dateinamen umbrechen) */
.da-suche { display: flex; align-items: center; gap: 8px; }
.da-suche input[type=search] { flex: 1 1 auto; min-width: 0; }
.da-nur-dateien { flex: 0 0 auto; margin: 0; font-size: 13px; white-space: nowrap; }
.da-explorer, .da-inhalt, .da-kopf, .da-scroll { min-width: 0; max-width: 100%; }
.da-liste .da-sp-name a, .da-liste .da-sp-name .da-gesperrt { overflow-wrap: anywhere; word-break: break-word; }
@media (max-width: 700px) {
    .da-explorer { width: 100%; }
    .da-scroll { overflow-x: hidden; }
    .da-kopf { flex-wrap: wrap; }
    .da-kopf > * { min-width: 0; }
    .da-liste { table-layout: fixed; width: 100%; }
    .da-liste td { white-space: normal; }
    .da-liste td.da-sp-name { padding: 10px 8px; }
    .da-liste .da-sp-wahl { width: 34px; padding-left: 6px; padding-right: 0; }
    .da-liste .da-sp-name a { display: inline; }
    .da-zeile-aktionen { float: none; display: flex; justify-content: flex-end; margin-top: 4px; }
    .da-dl { float: none; }
    .od-kacheln.da-kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .od-kachel { min-width: 0; }
    .da-auswahl { max-width: calc(100vw - 24px); }
}
/* Dateien › Handy: Liste als Zeilen in Bildschirmbreite (keine Tabelle mehr, kein seitlicher Wischrahmen) –
   links Auswahl, daneben Vorschau + Name + Größe/Datum, darunter ⬇ ✎ 🗑 als gut sichtbare Knöpfe */
@media (max-width: 700px) {
    .da-liste, .da-liste tbody { display: block; width: 100%; }
    .da-liste thead { display: none; }
    .da-liste tr { display: flex; align-items: flex-start; gap: 8px; width: 100%; padding: 10px 8px; border-bottom: 1px solid var(--line); box-sizing: border-box; }
    .da-liste td { display: block; border: 0; padding: 0; min-width: 0; }
    .da-liste td.da-sp-datum, .da-liste td.da-sp-typ, .da-liste td.da-sp-groesse { display: none; }
    .da-liste td.da-sp-wahl { flex: 0 0 auto; width: auto; padding-top: 10px; }
    .da-liste td.da-sp-name { flex: 1 1 auto; min-width: 0; padding: 0; font-size: 15px; overflow-wrap: anywhere; word-break: break-word; }
    .da-liste td.da-sp-name > a:first-of-type, .da-liste td.da-sp-name > .da-gesperrt { display: flex; align-items: center; gap: 8px; min-width: 0; }
    .da-liste .da-sym { flex: 0 0 auto; }
    .da-liste .da-mobil-info { display: block; margin: 2px 0 0 0; padding-left: 56px; }
    .da-liste .da-dl, .da-liste .da-zeile-aktionen { display: inline-flex; float: none; opacity: 1; margin: 6px 6px 0 0; }
    .da-liste .da-dl { align-items: center; justify-content: center; width: 40px; height: 34px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; margin-left: 56px; }
    .da-liste .da-zeile-aktionen { gap: 6px; }
    .da-liste .da-zeile-aktionen button { width: 40px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-size: 16px; }
    .da-liste td.da-sp-name > a:first-of-type + .da-zeile-aktionen { margin-left: 56px; } /* Ordner ohne ⬇: Knöpfe unter dem Namen */
}
/* Dateien: Knöpfe ⬇ ✎ 🗑 gesammelt rechts */
.da-knoepfe { float: right; display: inline-flex; align-items: center; gap: 4px; margin-left: 12px; }
.da-knoepfe .da-dl { margin-left: 0; }
.da-knoepfe .da-zeile-aktionen { float: none; }
@media (max-width: 700px) {
    /* Name links (umbrechend), Knöpfe rechts in eigener Spalte; Größe/Datum unter dem Namen */
    .da-liste td.da-sp-name { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: start; }
    .da-liste td.da-sp-name > * { grid-column: 1; }
    .da-liste td.da-sp-name > .da-knoepfe { grid-column: 2; grid-row: 1 / span 3; float: none; margin: 0; display: flex; flex-direction: row; gap: 6px; align-self: center; }
    .da-liste td.da-sp-name > br { display: none; }
    .da-knoepfe .da-dl, .da-knoepfe .da-zeile-aktionen { margin: 0 !important; }
    .da-knoepfe .da-dl { margin-left: 0 !important; }
    .da-liste td.da-sp-name > a:first-of-type + .da-zeile-aktionen { margin-left: 0; }
}
@media (max-width: 700px) {
    /* Dateiname über die volle Breite; darunter links Größe/Datum, rechts ⬇ ✎ 🗑 auf gleicher Höhe */
    .da-liste td.da-sp-name { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name name" "ort ort" "info knoepfe"; row-gap: 0; align-items: center; }
    .da-liste td.da-sp-name > :first-child { grid-area: name; }
    .da-liste td.da-sp-name > small.muted { grid-area: ort; padding-left: 56px; }
    .da-liste td.da-sp-name > .da-mobil-info { grid-area: info; align-self: center; }
    .da-liste td.da-sp-name > .da-knoepfe { grid-area: knoepfe; justify-self: end; align-self: center; margin-top: 4px; } /* Knöpfe ganz rechts */
}
/* Dateien-Freigaben: Team-/Benutzer-Auswahl – Häkchen links, Name daneben (Formular-Labels sind sonst untereinander) */
.da-freigabe-neu label.multi-option { flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; padding: 7px 10px; }
.da-freigabe-neu label.multi-option input[type="checkbox"] { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; }
.da-freigabe-neu label.multi-option span { flex: 1 1 auto; min-width: 0; text-align: left; }
/* Dateien: Unterordner mit eigenem Schreibrecht (z. B. Teamleiter) */
.da-schreib-mark { color: var(--green, #1a7f37); font-weight: 700; }
/* Dateien-Freigaben: Ordner mit Spalten Lesen / Schreiben */
.da-ordner-neu .da-recht-feld { flex: 1 1 300px; min-width: 0; }
.da-rechte .da-chip-schreiben { background: #e6f4ea; border-color: #b7dfc2; color: #1a7f37; }
/* Ordner-Zeile: Einzug/Pfeil direkt vor dem Pfad, darunter Status + Anzeigename; Hauptordner hervorgehoben */
.da-rechte td { vertical-align: top; }
.da-rechte .da-ordner-zeile { display: flex; align-items: center; gap: 6px; min-width: 0; }
.da-rechte .da-ordner-zeile .da-pfadwahl { flex: 1 1 auto; min-width: 0; }
.da-rechte .da-einzug { flex: 0 0 auto; color: var(--muted); font-weight: 700; font-size: 16px; }
.da-rechte .da-einzug-haupt { font-size: 15px; }
.da-rechte .da-ordner-info { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 6px; }
.da-rechte .da-bez { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; font-weight: 500; color: var(--muted); }
.da-rechte .da-bez input { width: 170px; padding: 4px 8px; font-size: 13px; }
.da-rechte tr.da-hauptordner > td { background: #f2f6fc; border-top: 2px solid #c9d6ea; }
.da-rechte tr.da-hauptordner .da-pfadwahl input { font-weight: 700; }
.da-rechte tr.da-unterordner > td:first-child { box-shadow: inset 3px 0 0 #c9d6ea; }
.da-rechte .da-chip-gesperrt { background: #fdecea; border-color: #f3b8b2; color: #b42318; }
.da-rechte .da-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.da-rechte .da-aktionen-stapel form { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 6px; align-items: center; justify-content: flex-end; } /* Speichern | Entfernen nebeneinander */
.da-rechte .da-dazu select { width: 100%; }
.da-rechte .da-chip-geerbt { cursor: default; background: transparent; border-style: dashed; color: var(--muted); font-weight: 500; }
.da-rechte .da-chip-geerbt:hover { border-color: #c9d6ea; background: transparent; color: var(--muted); }
/* Dateien-Freigaben: Ebenen farbig (Haupt-, Unter-, Unter-Unterordner …), Erreichbarkeit nur bei Problemen bzw. auf Knopfdruck */
.da-rechte-kopf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.da-rechte-kopf > :first-child { flex: 1 1 260px; }
.da-rechte-kopf .btn { margin-right: 12px; }
.da-rechte tr.da-tiefe-1 > td { background: #f7f9fe; }
.da-rechte tr.da-tiefe-1 > td:first-child { box-shadow: inset 4px 0 0 #9fb8e0; }
.da-rechte tr.da-tiefe-2 > td { background: #f6fbf7; }
.da-rechte tr.da-tiefe-2 > td:first-child { box-shadow: inset 4px 0 0 #8fcaa0; }
.da-rechte tr.da-tiefe-3 > td { background: #fdfaf3; }
.da-rechte tr.da-tiefe-3 > td:first-child { box-shadow: inset 4px 0 0 #e3c27a; }
.da-rechte tr.da-tiefe-4 > td { background: #faf6fd; }
.da-rechte tr.da-tiefe-4 > td:first-child { box-shadow: inset 4px 0 0 #c3a3df; }
.da-rechte .da-status-ok { display: none; }
.da-rechte.da-status-an .da-status-ok { display: inline; }
.da-rechte tr.da-zeile-fehler > td { background: #fdecea !important; }
.da-rechte tr.da-zeile-fehler > td:first-child { box-shadow: inset 4px 0 0 #d92d20 !important; }
.da-rechte tr.da-zeile-fehler .da-pfadwahl input { border-color: #d92d20; }
/* Dateien-Freigaben: feste Spaltenbreiten – Lesen und Schreiben gleich breit; Anzeigename in jeder Zeile gut sichtbar */
.da-rechte { table-layout: fixed; width: 100%; min-width: 1050px; }
.da-rechte col.da-col-ordner { width: 26%; }
.da-rechte col.da-col-bez { width: 14%; }
/* Lesen, Schreiben und Ausgeblendet ohne eigene Breite → teilen sich den Rest gleichmäßig */
.da-rechte col.da-col-aktion { width: 196px; }
.da-rechte td, .da-rechte th { overflow-wrap: anywhere; }
.da-rechte .da-chip { max-width: 100%; text-align: left; }
.da-rechte .da-dazu select { width: 100%; max-width: 100%; }
.da-rechte .da-ordner-info { display: flex !important; }
.da-rechte .da-bez { display: flex !important; align-items: center; gap: 6px; flex: 1 1 220px; min-width: 0; margin: 0; font-size: 12px; font-weight: 600; color: var(--text, #1f2937); }
.da-rechte .da-bez input { flex: 1 1 auto; width: auto; min-width: 0; max-width: 260px; padding: 4px 8px; font-size: 13px; background: #fff; }
/* Dateien-Freigaben › NAS-Struktur */
.da-struktur-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin-bottom: 10px; }
.da-struktur, .da-struktur ul { list-style: none; margin: 0; padding: 0; }
.da-struktur ul { padding-left: 22px; border-left: 1px dashed var(--line); margin-left: 11px; }
.da-st-zeile { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding: 4px 6px; border-radius: 6px; }
.da-st-zeile:hover { background: #f3f6fb; }
.da-st-zeile.hat-rechte { background: #f2f6fc; }
.da-st-auf { border: 0; background: none; cursor: pointer; width: 22px; color: var(--muted); font-size: 13px; padding: 0; }
.da-st-name { font-weight: 500; overflow-wrap: anywhere; }
.da-st-zeile.hat-rechte .da-st-name { font-weight: 700; }
.da-st-recht { font-size: 12px; font-weight: 600; border-radius: 12px; padding: 1px 8px; border: 1px solid #c9d6ea; background: #eef3fb; color: #1d4f91; cursor: help; }
.da-st-recht.s { background: #e6f4ea; border-color: #b7dfc2; color: #1a7f37; }
.da-st-recht.x { background: #fdecea; border-color: #f3b8b2; color: #b42318; }
.da-st-punkt { color: #1d4f91; font-weight: 700; font-size: 18px; line-height: 1; }
.da-st-knopf { margin-left: auto; padding: 2px 8px; font-size: 12px; opacity: 0; }
.da-st-zeile:hover .da-st-knopf, .da-st-zeile:focus-within .da-st-knopf { opacity: 1; }
@media (hover: none) { .da-st-knopf { opacity: 1; } }
.da-rechte tr.da-blitz > td { background: #fff4c2 !important; transition: background .3s; }
/* Dateien-Freigaben › Vorschau: Ordnerbaum aus Sicht des Benutzers */
.da-vb-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; }
.da-vb-kopf > span { display: flex; align-items: center; gap: 12px; }
.da-vb .da-vb-weg { opacity: .55; }
.da-vb .da-vb-weg .da-st-name { text-decoration: line-through; }
/* Dateien-Freigaben: Anzeigename in eigener Spalte */
.da-rechte .da-bez-feld { width: 100%; padding: 6px 8px; font-size: 13px; background: #fff; }
.da-rechte .da-sp-ordner > small { display: block; margin-top: 4px; }
.da-rechte .da-sp-ordner > small.da-status-ok { display: none; }
.da-rechte.da-status-an .da-sp-ordner > small.da-status-ok { display: block; }
/* Dateien-Freigaben: Rechte als kompakte Mehrfachauswahl, Details im Hinweisfenster */
.da-rechte .da-recht-zelle { position: relative; }
.da-rechte .da-recht-wahl { display: block; width: 100%; min-width: 0; }
.da-rechte .da-recht-wahl .multi-knopf { padding: 6px 10px; font-size: 13px; min-height: 34px; }
.da-rechte .da-recht-wahl [data-multi-text] { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.da-rechte .da-recht-wahl.hat-auswahl.da-recht-schreiben .multi-knopf { background: #e6f4ea; border-color: #b7dfc2; color: #1a7f37; }
.da-rechte .da-recht-wahl.hat-auswahl.da-recht-lesen .multi-knopf { background: #eef3fb; border-color: #c9d6ea; color: #1d4f91; }
.da-rechte .da-recht-wahl.hat-auswahl.da-recht-sperre .multi-knopf { background: #fdecea; border-color: #f3b8b2; color: #b42318; }
.da-rechte .da-recht-wahl.speichert .multi-knopf { opacity: .6; }
.da-rechte .da-erbt-zahl { flex: 0 0 auto; font-size: 11px; font-weight: 600; color: var(--muted); border: 1px dashed #c9d6ea; border-radius: 10px; padding: 0 6px; }
.da-rechte .da-recht-wahl .multi-liste { width: max(100%, 320px); }
.da-rechte .da-opt-gruppe { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 6px 8px 2px; }
.da-rechte .multi-option small { margin-left: auto; font-size: 11px; }
.da-rechte .multi-option .da-opt-schreibt { display: none; }
.da-rechte .multi-option.schreibt { opacity: .6; }
.da-rechte .multi-option.schreibt .da-opt-schreibt { display: inline; }
.da-rechte .da-tip { display: none; position: absolute; z-index: 40; left: 8px; top: calc(100% - 6px); min-width: 220px; max-width: 340px; padding: 10px 12px;
    background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(15, 23, 42, .15); font-size: 13px; line-height: 1.5; pointer-events: none; }
.da-rechte .da-tip b { display: block; margin-bottom: 4px; font-size: 12px; }
.da-rechte .da-tip-erbt { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); color: var(--muted); }
.da-rechte .da-recht-zelle:hover > .da-tip { display: block; }
.da-rechte .da-recht-zelle:has(details[open]) > .da-tip { display: none; }
@media (hover: none) { .da-rechte .da-tip { display: none !important; } }
.table-scroll:has(.da-recht-zelle:hover) { overflow: visible; } /* Hinweisfenster nicht abschneiden */
/* Dateien-Freigaben: nur Ordner mit berechtigten Unterordnern hervorheben; Baumlinien statt Pfeil */
.da-rechte tr.da-hauptordner > td, .da-rechte tr[class*="da-tiefe-"] > td { background: transparent; }
.da-rechte tr.da-hauptordner > td { border-top: 1px solid var(--line); }
.da-rechte tr[class*="da-tiefe-"] > td:first-child { box-shadow: none; }
.da-rechte tr.da-hauptordner .da-pfadwahl input { font-weight: 400; }
.da-rechte tr.da-eltern > td { background: #eef3fb; }
.da-rechte tr.da-eltern.da-tiefe-1 > td { background: #f1f8f3; }
.da-rechte tr.da-eltern.da-tiefe-2 > td { background: #fdf8ec; }
.da-rechte tr.da-eltern.da-tiefe-3 > td, .da-rechte tr.da-eltern.da-tiefe-4 > td { background: #f8f3fc; }
.da-rechte tr.da-eltern > td:first-child { box-shadow: inset 4px 0 0 #6f95cf; }
.da-rechte tr.da-eltern.da-tiefe-1 > td:first-child { box-shadow: inset 4px 0 0 #6fbf86; }
.da-rechte tr.da-eltern.da-tiefe-2 > td:first-child { box-shadow: inset 4px 0 0 #d9ad4f; }
.da-rechte tr.da-eltern.da-tiefe-3 > td:first-child, .da-rechte tr.da-eltern.da-tiefe-4 > td:first-child { box-shadow: inset 4px 0 0 #a77bd0; }
.da-rechte tr.da-eltern .da-pfadwahl input { font-weight: 700; }
.da-rechte .da-baumlinie { flex: 0 0 auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; color: #8aa0bf; font-size: 15px; line-height: 1; letter-spacing: -1px; }
/* Neue Mail: Anhänge aus dem Datei-Explorer */
.mp-explorer-dateien { margin-top: 12px; }
.mp-explorer-dateien .mp-ex-titel { display: block; font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.mp-explorer-dateien .mp-dateiliste { display: block; }
.mp-explorer-dateien li { display: flex; align-items: center; gap: 8px; }
.mp-ex-weg { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 14px; padding: 2px 6px; border-radius: 6px; }
.mp-ex-weg:hover { background: var(--red-soft); color: var(--red-dark); }
/* Mail-Entwürfe (Update 200): Hinweis in der Mail, Art-Kennzeichen und Löschen in der Liste */
.mp-entwurf-hinweis { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 10px 16px 0; padding: 8px 12px; border-radius: 8px;
    background: #fff7e0; border: 1px solid #f0d58a; color: #6b4e00; font-size: 14px; }
.mp-entwurf-hinweis .btn { margin-left: auto; }
.pill-entwurf { background: #fff1c7; color: #7a5600; margin-right: 4px; font-size: 10px; }
.mp-entwurf-weg { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 2px 4px; margin-left: 6px; border-radius: 6px; vertical-align: middle; }
.mp-entwurf-weg .mp-svg { width: 16px; height: 16px; }
.mp-entwurf-weg:hover { background: var(--red-soft); color: var(--red-dark); }
/* Dateien: ⬇ und ✉ als gleich große Symbol-Knöpfe */
.da-knoepfe .da-ikon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 28px; border: 1px solid var(--line); border-radius: 7px;
    background: var(--panel, #fff); color: var(--text, #1f2937); text-decoration: none; }
.da-knoepfe .da-ikon:hover { border-color: #9fb8e0; background: #eef3fb; color: #1d4f91; }
.da-knoepfe .da-mail:hover { border-color: #b7dfc2; background: #e6f4ea; color: #1a7f37; }
@media (max-width: 700px) { .da-knoepfe .da-ikon { width: 40px; height: 34px; } }
/* Mail: Anhänge aus der Dokumentenablage */
.mp-da-knopf { margin: 6px 0 2px; }
.da-wahl-dialog { width: min(640px, calc(100vw - 24px)); }
.da-wahl-liste { max-height: min(60vh, 520px); overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px; margin: 8px 0 12px; }
.da-wahl-eintrag { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 6px; cursor: pointer; font: inherit; font-weight: 600; }
.da-wahl-eintrag:hover { background: #f3f6fb; }
.da-wahl-hoch { color: var(--muted); font-weight: 500; }
.da-wahl-datei { display: flex; align-items: center; gap: 10px; margin: 0; padding: 7px 10px; border-radius: 6px; font-weight: 400; font-size: 14px; cursor: pointer; }
.da-wahl-datei:hover { background: #f3f6fb; }
.da-wahl-datei input { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; }
.da-wahl-datei span { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.da-wahl-datei small { flex: 0 0 auto; }
/* Infoticker: nur bei passendem Einsatz (Ortschaft/Stichwort) */
.it-einsatz { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: var(--radius); }
.it-einsatz-titel { font-weight: 700; font-size: 13px; }
.it-einsatz-felder { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 16px; }
.it-einsatz-felder label { margin-top: 0; }
.it-einsatz .multi-dropdown { display: block; width: 100%; min-width: 0; }
/* Nicht zugeordnete Einsatzmittel: vorgeschlagene Wehr */
#offene-fz-table select { width: 100%; }
#offene-fz-table select.fz-vorschlag { border-color: #b7dfc2; background: #f1faf3; }
#offene-fz-table tr.fz-gruppe td { background: #f2f6fc; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #1d4f91; padding-top: 8px; padding-bottom: 8px; }
/* Team-Postfach am PC: Ansichten (Posteingang, Ungelesen, Wichtig, Gesendet, Archiv) als schwebende Leiste unten – oben entfallen die Pillen */
@media (min-width: 701px) {
    .mp-unten { display: flex; position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 50; gap: 4px; padding: 6px;
        border: 1px solid rgba(0, 0, 0, .08); border-radius: 30px; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
        box-shadow: 0 8px 28px rgba(15, 23, 42, .18); }
    .mp-unten a { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 22px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; }
    .mp-unten a:hover { background: rgba(0, 0, 0, .05); }
    .mp-unten a.an { background: rgba(0, 0, 0, .09); }
    .mp-unten-sym { position: relative; display: inline-flex; }
    .mp-unten a .mp-svg { width: 20px; height: 20px; }
    .mp-unten-zahl { position: absolute; top: -9px; right: -12px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11px; line-height: 20px; text-align: center; border: 2px solid #fff; }
    .mp-liste-scroll { padding-bottom: 76px; }
    .menu-offen .mp-unten { display: none; }
}
/* Team-Postfach: Mehrfachauswahl – Aktionen als Leiste unten anstelle der Ansichten (Handy und PC) */
html.mp-wahl-an .mp-unten { display: none !important; }
.mp-sammel-leiste:not([hidden]) { position: fixed; top: auto; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 55; margin: 0;
    display: flex; flex-wrap: nowrap; align-items: stretch; gap: 4px; padding: 6px; max-width: calc(100vw - 24px); overflow-x: auto;
    border: 1px solid rgba(0, 0, 0, .08); border-radius: 30px; background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
    box-shadow: 0 8px 28px rgba(15, 23, 42, .2); }
.mp-sammel-info { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px 0 4px; white-space: nowrap; }
.mp-sammel-info b { margin: 0; color: var(--red-dark); font-size: 13px; }
.mp-sammel-zu { position: relative; width: 32px; height: 32px; border: 0; border-radius: 16px; background: rgba(0, 0, 0, .07); cursor: pointer; font-size: 14px; }
.mp-sammel-zahl { display: none; position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff;
    font-style: normal; font-size: 11px; font-weight: 700; line-height: 18px; }
@media (max-width: 700px) { .mp-sammel-zahl { display: block; } .mp-sammel-zu { width: 40px; height: 40px; border-radius: 20px; align-self: center; } }
.mp-sammel-knopf { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border: 0; border-radius: 22px; background: transparent; color: var(--ink);
    font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.mp-sammel-knopf:hover { background: rgba(0, 0, 0, .06); }
.mp-sammel-knopf .mp-svg { width: 20px; height: 20px; }
.mp-sammel-gefahr { color: var(--red-dark); }
.mp-sammel-gefahr:hover { background: var(--red-soft); }
@media (max-width: 700px) {
    .mp-sammel-leiste:not([hidden]) { left: 12px; right: 12px; transform: none; max-width: none; justify-content: space-between; border-radius: 34px; }
    .mp-sammel-info b { display: none; } /* Anzahl steht am Handy nur über das Häkchen in der Liste */
    .mp-sammel-knopf { flex: 1 1 0; flex-direction: column; gap: 2px; padding: 6px 4px; min-height: 56px; border-radius: 28px; font-size: 11px; }
    .mp-sammel-knopf .mp-svg { width: 24px; height: 24px; }
    .mp-sammel-leiste .btn { flex: initial; }
}
.menu-offen .mp-sammel-leiste { display: none !important; }
/* Ticket: Mail aus dem Ticket */
.tk-mail-knopf { display: flex; justify-content: flex-end; margin: -6px 0 10px; }
.tk-mail-titel { display: block; font-size: 12px; font-weight: 700; margin: 10px 0 4px; }
.tk-aendern-knopf { margin-left: 8px; vertical-align: middle; }
/* Fenster „Ticket ändern“: Felder füllen die Breite, nichts läuft seitlich heraus */
#dlg-tk-aendern .mp-schreiben { overflow-x: hidden; }
#dlg-tk-aendern select, #dlg-tk-aendern input[type="text"] { width: 100%; max-width: 100%; box-sizing: border-box; }
#dlg-tk-aendern .mp-dialog-kopf > div { min-width: 0; }
#dlg-tk-aendern .mp-dialog-info { white-space: normal; overflow-wrap: anywhere; }
/* MAÜ-Übersicht (Prüffälle): Kopf, Karten, Einsatzmittel, Zeitleiste */
.pk { margin-top: 10px; }
.pk-kopf { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 10px; background: linear-gradient(90deg, #fdecea, #fff6f5); border: 1px solid #f3c6c0; }
.pk-kopf small { display: block; color: var(--muted); margin-top: 2px; }
.pk-sw { flex: 0 0 auto; padding: 6px 12px; border-radius: 8px; background: var(--red); color: #fff; font-weight: 800; font-size: 18px; letter-spacing: .02em; }
.pk-sw.leer { background: #9aa3ad; font-size: 13px; font-weight: 700; }
.pk-mb { font-size: 17px; }
.pk-karten { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-top: 12px; }
.pk-karte { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--panel, #fff); }
.pk-karte h5, .pk-titel { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: #1d4f91; }
.pk-titel { margin: 16px 0 8px; }
.pk-z { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; padding: 4px 0; border-top: 1px dashed #eef0f3; font-size: 14px; }
.pk-z:first-of-type { border-top: 0; }
.pk-z > span { color: var(--muted); font-size: 12px; padding-top: 2px; }
.pk-z > b { font-weight: 600; overflow-wrap: anywhere; }
.pk-z > b.pk-text { font-weight: 400; }
.pk-tabelle { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.pk-tabelle .table { margin: 0; }
.pk-zeitleiste { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid #d9e2ef; }
.pk-zeitleiste li { position: relative; display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 10px; padding: 5px 0; font-size: 14px; }
.pk-zeitleiste li::before { content: ''; position: absolute; left: -20px; top: 11px; width: 10px; height: 10px; border-radius: 50%; background: #1d4f91; border: 2px solid #fff; }
.pk-zeitleiste time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; padding-top: 2px; }
@media (max-width: 700px) { .pk-z { grid-template-columns: 1fr; gap: 0; } .pk-kopf { flex-wrap: wrap; } }
/* Einsatzübersicht: Aktionen als Menüs (Pflege · Mail · Vorgang anlegen) */
.ei-menues { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ei-menue { position: relative; }
.ei-menue > summary { list-style: none; cursor: pointer; }
.ei-menue > summary::-webkit-details-marker { display: none; }
.ei-menue-liste { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 230px; padding: 6px; background: var(--panel, #fff);
    border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(15, 23, 42, .16); display: flex; flex-direction: column; }
.ei-menue-liste.ei-menue-rechts { left: auto; right: 0; }
.ei-menue-liste a, .ei-menue-liste button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-radius: 7px; background: none;
    color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap; }
.ei-menue-liste a:hover, .ei-menue-liste button:hover { background: #f3f6fb; }
.ei-menue-liste form { margin: 0; }
.ei-menue-liste button.active { background: #eef3fb; color: #1d4f91; }
@media (max-width: 700px) { .ei-menue-liste, .ei-menue-liste.ei-menue-rechts { left: auto; right: 0; } }
/* Einsatzübersicht: alle drei Menü-Knöpfe gleich (Größe, Schrift, Rahmen) */
.ei-menue > summary.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 190px; height: 40px; padding: 0 16px;
    font-size: 14px; font-weight: 600; white-space: nowrap; box-sizing: border-box; }
.ei-menue[open] > summary.btn-outline { border-color: var(--red); color: var(--red-dark); background: var(--red-soft); }
.ei-menue[open] > summary.btn-primary { filter: brightness(.92); }
@media (max-width: 700px) {
    /* Handy: die Knopfleiste scrollt sonst seitlich und schneidet die Menüs ab → umbrechen, Menüs sichtbar */
    .page-actions.ei-menues { overflow: visible; flex-wrap: wrap; -webkit-mask-image: none; mask-image: none; padding: 0; margin: 0; }
    .page-actions.ei-menues > .ei-menue { flex: 1 1 0; min-width: 0; }
    .ei-menue > summary.btn { min-width: 0; width: 100%; height: 44px; padding: 0 8px; font-size: 13px; }
    .ei-menue-liste { left: 0; right: auto; min-width: min(260px, calc(100vw - 32px)); }
    .ei-menues > .ei-menue:last-child .ei-menue-liste { left: auto; right: 0; }
    .ei-menue-liste a, .ei-menue-liste button { padding: 12px 14px; font-size: 15px; }
}
/* Einsatz anlegen: geführt in drei Schritten */
.ew-schritte { display: flex; gap: 8px; list-style: none; margin: 0 0 14px; padding: 0; counter-reset: none; }
.ew-schritte li { flex: 1 1 0; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel, #fff);
    font-weight: 600; color: var(--muted); cursor: pointer; user-select: none; }
.ew-schritte li span { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #eef0f3; color: var(--muted); font-weight: 800; }
.ew-schritte li.an { border-color: var(--red); color: var(--ink); box-shadow: 0 0 0 3px var(--red-soft); }
.ew-schritte li.an span { background: var(--red); color: #fff; }
.ew-schritte li.fertig { color: #1a7f37; }
.ew-schritte li.fertig span { background: #e6f4ea; color: #1a7f37; }
.ew-schritte li.fertig span::after { content: ''; }
.ew-zf { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 6px 18px; margin-bottom: 6px; }
.ew-zf > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; padding: 6px 0; border-bottom: 1px dashed #eef0f3; }
.ew-zf span { color: var(--muted); font-size: 12px; padding-top: 2px; }
.ew-zf b { font-weight: 600; overflow-wrap: anywhere; }
.ew-gefuehrt .form-actions { position: sticky; bottom: 0; z-index: 5; padding: 10px 0; background: linear-gradient(to top, var(--bg) 70%, transparent); }
@media (max-width: 700px) {
    .ew-schritte { gap: 4px; }
    .ew-schritte li { flex-direction: column; gap: 4px; padding: 8px 4px; font-size: 12px; text-align: center; }
}
/* Einsatz anlegen: „Weiter“ bzw. „Anlegen“ unten rechts */
.ew-gefuehrt .form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ew-gefuehrt .form-actions .ew-weiter { margin-left: auto; }
.ew-gefuehrt .form-actions .ew-weiter + .ew-weiter { margin-left: 0; }
/* Übungs-Szenarien */
.ue-schritte { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.ue-schritt { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel, #fff); }
.ue-schritt select { flex: 1 1 260px; min-width: 0; }
.ue-nr { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; }
.ue-nach { display: inline-flex; align-items: center; gap: 6px; }
.ue-nach input { width: 80px; }
.ue-zeitplan { margin-top: 8px; }
.ue-lauf-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.ue-knoepfe { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ue-knoepfe form { margin: 0; }
.ue-lauf.laeuft { border-left: 4px solid #6d28d9; }
.ue-zeitleiste { list-style: none; margin: 10px 0 0; padding: 0 0 0 14px; border-left: 2px solid #ddd6fe; }
.ue-zeitleiste li { position: relative; display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 10px; padding: 5px 0; font-size: 14px; }
.ue-zeitleiste li::before { content: ''; position: absolute; left: -20px; top: 10px; width: 10px; height: 10px; border-radius: 50%; background: #c4b5fd; border: 2px solid #fff; }
.ue-zeitleiste li.fertig::before { background: #1a7f37; }
.ue-zeitleiste li.fehler::before { background: #d92d20; }
.ue-zeitleiste li.entfallen { opacity: .5; }
.ue-zeitleiste time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.ue-ap { flex: 1 1 220px; min-width: 0; }
.ue-ap .multi-dropdown { display: block; width: 100%; min-width: 0; }
.ue-art { flex: 0 0 auto; width: auto; }
.ue-mail { flex: 1 1 220px; min-width: 0; }
.ue-start { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.ue-start-zeit { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-weight: 500; font-size: 13px; }
.ue-start-zeit input { width: auto; padding: 4px 6px; font-size: 13px; }
/* Übungen: Suche in der Auswahl, Fahrzeuge je Einsatz */
.ue-quelle { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ue-suche { padding: 5px 8px; font-size: 13px; }
.ue-fz { flex: 1 1 100%; border-top: 1px dashed var(--line); padding-top: 6px; margin-top: 2px; }
.ue-fz > summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.ue-fz-liste { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.ue-fz-zeile { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto auto; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 6px; background: #f8fafc; }
.ue-fz-zeile .check { margin: 0; }
.ue-fz-zeile small { white-space: nowrap; }
.ue-fz-neu { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ue-fz-neu input[type="text"] { flex: 1 1 200px; min-width: 0; }
.ue-fz-neu input[data-ue-fz-staerke] { flex: 0 1 110px; }
.ue-fz-plan { margin-top: 4px; }
.ue-fz-plan > summary { cursor: pointer; font-size: 12px; color: #1d4f91; }
.ue-fz-plan ul { margin: 4px 0 0 16px; padding: 0; font-size: 13px; }
@media (max-width: 700px) { .ue-fz-zeile { grid-template-columns: 28px minmax(0, 1fr) auto; } .ue-fz-zeile small { display: none; } }
/* Übungen: Auswahl normal hoch (die Regel „flex: 1 1 260px“ für die Zeile machte sie in der Spalte 260 px hoch) */
.ue-quelle select { flex: 0 0 auto; height: auto; width: 100%; }
.ue-schritt { align-items: flex-start; }
.ue-schritt > .ue-nr, .ue-schritt > .ue-nach, .ue-schritt > .ue-art, .ue-schritt > .btn { margin-top: 4px; }
/* Übungen: Auswahl als Dropdown mit Suche */
.ue-kombi { position: relative; width: 100%; }
.ue-kombi-knopf { display: block; width: 100%; text-align: left; padding: 8px 32px 8px 12px; border: 1px solid var(--line); border-radius: var(--radius, 8px); background: var(--panel, #fff);
    font: inherit; font-size: 14px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; position: relative; }
.ue-kombi-knopf::after { content: '▾'; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.ue-kombi-knopf.leer { color: var(--muted); }
.ue-kombi-panel { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 45; min-width: 320px; padding: 8px; background: var(--panel, #fff);
    border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(15, 23, 42, .18); }
.ue-kombi-panel input[type="search"] { width: 100%; margin-bottom: 6px; }
.ue-kombi-liste { max-height: 320px; overflow-y: auto; }
.ue-kombi-liste[data-leer]:not([data-leer=""])::after { content: attr(data-leer); display: block; padding: 8px; color: var(--muted); font-size: 13px; }
.ue-kombi-gruppe { padding: 8px 8px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ue-kombi-eintrag { display: block; width: 100%; text-align: left; padding: 7px 10px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 14px; cursor: pointer; }
.ue-kombi-eintrag:hover { background: #f3f6fb; }
.ue-kombi-eintrag.an { background: #eef3fb; color: #1d4f91; font-weight: 600; }
/* Stechuhr: Ort (Wache / Zuhause / Unterwegs) */
.stechuhr-form .zt-ort { width: auto; max-width: 100%; }

/* Reiterleiste bleibt beim Scrollen oben stehen (z. B. Meine Informationen) */
.tab-box-fest > .tabs { position: sticky; top: 0; z-index: 15; }
@media (max-width: 700px) {
    .tab-box-fest > .tabs { top: var(--topbar-h); }
}

/* Auswertung (modules/auswertung) */
.aw-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 10px; }
.aw-kopf > span { display: flex; flex-wrap: wrap; gap: 6px; }
.aw-filter label { display: inline-flex; gap: 4px; align-items: center; }
.aw-liste summary { cursor: pointer; color: var(--muted); }
.aw-liste ul { margin: 4px 0 0; padding-left: 18px; }
.aw-personal tr.muted td { color: var(--muted); }

/* Lange Texte einklappen ([data-einklappen], z. B. Ticket-Beschreibung aus Mails) */
.eingeklappt { max-height: var(--einklapp-hoehe, 240px); overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.einklapp-knopf { display: inline-block; margin: 4px 0 8px; padding: 2px 0; background: none; border: 0; color: var(--red); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.einklapp-knopf:hover { text-decoration: underline; }
@media print {
    .eingeklappt { max-height: none; overflow: visible; -webkit-mask-image: none; mask-image: none; }
    .einklapp-knopf { display: none; }
}

/* Ticketliste: Schnell-Bearbeitung (Stufe 4 / Admin-Ansicht) */
.tk-status-schnell select { padding: 3px 6px; font-size: 12px; max-width: 150px; }
/* Schnell-Knöpfe nebeneinander, je ein Drittel der Spalte (Symbol über kurzer Beschriftung) – Zeilen bleiben niedrig */
.tk-schnell { width: 210px; min-width: 210px; }
.tk-schnell-knoepfe { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.tk-schnell-knoepfe .btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; width: 100%;
                           padding: 4px 2px; font-size: 11px; line-height: 1.15; white-space: nowrap; text-align: center; }
.tk-schnell-knoepfe .btn > span:first-child { font-size: 14px; }
.tk-schnell-knoepfe .tk-sofort { margin: 0; display: contents; }
.tk-btn-erledigt { background: #e8f5ec; color: #1e6b34; border: 1px solid #9fd3ad; font-weight: 700; }
.tk-btn-erledigt:hover { background: #d4eedc; }

/* Wehren & Funktionen: Kopf mit Suche und Mandanten-Filter */
.stamm-wehr-kopf { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.stamm-wehr-kopf label { display: inline-flex; gap: 6px; align-items: center; padding: 0 14px; }
tr.mandant-aus { display: none; }

/* Stichwort-Dokumente (modules/einsaetze/stichwort_ordner.php) */
.sw-ordner-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; align-items: end; }
.sw-ordner-tabelle input[type=text] { width: 100%; min-width: 120px; }

/* Einsatzdokumente, Listenansicht: kleine Miniatur (Bild / erste PDF-Seite) vor dem Dateinamen */
.od-l-datei { display: inline-flex; align-items: center; gap: 8px; }
.od-l-bild { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 4px; background: var(--bg); overflow: hidden; font-size: 20px; }
.od-l-bild.mit-bild { background: #e9edf2; }
.od-l-bild img, .od-l-bild canvas { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Einsatzdokumente: Ablage in der Einsatzdokumentation (nur dort Schreibrecht) */
.od-ablage { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 8px 0 10px; padding: 10px 12px; border: 1px dashed #9fd3ad; border-radius: 8px; background: #f2fbf4; }
.od-ablage-titel { font-weight: 700; flex-basis: 100%; }
.od-ablage-titel small { font-weight: 400; color: var(--muted); }
.od-ablage form { margin: 0; }
.od-ablage-form { display: inline-flex; margin: 0; }
.od-ablage-datei { cursor: pointer; }

/* ---------- Rundschreiben (Update 114) ---------- */
.rs-balken { height: 10px; border-radius: 5px; background: #eef0f3; overflow: hidden; margin: 12px 0 8px; }
.rs-balken span { display: block; height: 100%; background: var(--green); transition: width .3s; }
.rs-text { padding: 12px 14px; border: 1px solid #e3e6ea; border-radius: var(--radius); background: #fafbfc; font-size: 14px; line-height: 1.45; }
@media (max-width: 700px) {
    .tk-filter-zeile .tk-suche { flex: 1 1 100%; min-width: 0; }
    .tk-filter-zeile .tk-multi { flex: 1 1 100%; max-width: none; }
}

/* Logos (Update 117): Vorschau in Mandantenverwaltung und Betreiber-Einstellungen */
.logo-vorschau { display: flex; align-items: center; gap: 10px; min-height: 60px; margin: 8px 0 12px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: var(--radius); background: #fff; }
.logo-vorschau img { display: block; max-height: 60px; max-width: 100%; width: auto; }

/* Fahrzeugberichte (Update 118) */
.fb-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.fb-karte { border: 1px solid var(--line); border-left: 4px solid #e0a800; border-radius: var(--radius); padding: 12px 14px; background: var(--panel, #fff); }
.fb-karte.fb-fertig { border-left-color: var(--green, #2e7d32); }
.fb-karte h3 { margin: 0 0 6px; font-size: 15px; }
.fb-form label { margin-top: 8px; }
.fb-zeile { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.fb-form .btn { margin-top: 10px; }
.fb-form .fb-textfeld { min-height: 180px; resize: vertical; line-height: 1.45; }
.fb-text { white-space: normal; font-size: 14px; line-height: 1.45; }
@media (max-width: 700px) { .fb-liste { grid-template-columns: 1fr; } .fb-zeile { grid-template-columns: 1fr; } }

/* Meine Zeiten › Zeit nachtragen (Update 121) */
.ze-nachtragen-zeile { margin: 12px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ze-nachtragen-zeiten { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 700px) { .ze-nachtragen-zeiten { grid-template-columns: 1fr; } }

/* Stechuhr am Handy: Hinweis zur Entfernung zur Wache */
.zt-geo { display: contents; }
.zt-geo-hinweis { flex: 1 1 100%; font-size: 12px; }

/* Meine Zeiten: Kopf der Liste – Überschrift links, Druck-Knopf rechts; am Handy untereinander */
.ze-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 16px 14px 0; }
.ze-kopf h3 { margin: 0; font-size: 15px; flex: 1 1 auto; min-width: 0; }
@media (max-width: 700px) { .ze-kopf h3 { flex-basis: 100%; } .ze-kopf .btn { flex: 1 1 auto; } }

/* Passwort-Safe (Update 122) */
.pw-daten { display: grid; grid-template-columns: 160px 1fr; gap: 8px 14px; margin: 12px 0; }
.pw-daten dt { color: var(--muted); font-size: 13px; }
.pw-daten dd { margin: 0; overflow-wrap: anywhere; }
.pw-maske { display: inline-block; min-width: 90px; padding: 2px 8px; border-radius: 6px; background: #f1f3f6; letter-spacing: 1px; font-family: ui-monospace, Menlo, monospace; }
.pw-maske.pw-offen { background: #fff5e0; letter-spacing: 0; user-select: all; }
.pw-zelle { white-space: nowrap; }
.pw-eingabe { display: flex; gap: 6px; }
.pw-eingabe input { flex: 1 1 auto; min-width: 0; font-family: ui-monospace, Menlo, monospace; }
@media (max-width: 700px) { .pw-daten { grid-template-columns: 1fr; } .pw-daten dt { margin-top: 6px; } }

/* Touch-Geräte (Handy/Tablet): Eingabefelder mit mindestens 16 px – sonst zoomt iOS beim Antippen automatisch in die Seite.
   (Zoomen per Fingergeste bleibt möglich – wichtig für die Barrierefreiheit.) */
@media (hover: none) and (pointer: coarse) {
    input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select, textarea, [contenteditable="true"], .me-feld { font-size: 16px !important; }
}

/* Team-Postfach › Mail-Regeln (Update 123) */
.mr-form .mr-teil { margin: 16px 0 0; padding: 12px 16px 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.mr-form .mr-teil legend { font-weight: 700; padding: 0 6px; }
.mr-form h4 { margin: 10px 0 4px; font-size: 14px; }
.mr-haken { display: grid; gap: 8px; padding-top: 22px; }
.mr-empf { margin: 6px 0 10px; }
.mr-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.mr-knoepfe { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.mr-knoepfe form { margin: 0; }
/* Team-Postfach: letzter Abruf unter der Überschrift, Push je Postfach */
.mp-abruf { font-size: 12px; }
.mp-push-zeile { padding: 8px 0; border-bottom: 1px solid var(--line); }

/* Zentrales Protokoll: Zugriffe auf Dokumente hervorheben */
.log-table tr.log-dok td { background: rgba(59, 130, 246, .06); }

/* Telefonbuch: IDECS-Schnellwahl je Telefonnummer (Update 131) */
.idecs-box { margin-top: 8px; padding: 6px 10px; border: 1px dashed var(--line, #d9dde3); border-radius: 8px; background: #fafbfc; }
.idecs-box > summary { cursor: pointer; }
.idecs-box[open] > summary { margin-bottom: 8px; }
.idecs-taste { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 6px 0; border-top: 1px solid #eceff3; }
.idecs-form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.idecs-form label[hidden] { display: none; }
.idecs-form .idecs-weitere { flex-basis: 100%; }
.idecs-form .idecs-weitere[open] { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.idecs-form .idecs-vorschau { flex-basis: 100%; margin: 0; }
.idecs-bild-vorschau img, .idecs-mini { max-height: 40px; max-width: 80px; vertical-align: middle; border-radius: 4px; }

/* Modul IDECS: Kurzwahl wie am Gerät (Update 132) */
.idecs-modus { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.idecs-geraet { max-width: 760px; padding: 14px; border-radius: 14px; background: #1b222b; box-shadow: inset 0 0 0 2px #2e3946, 0 6px 18px rgba(0,0,0,.25); color: #e9eef4; }
.idecs-kopf { display: flex; align-items: center; justify-content: center; gap: 10px; margin: -2px 0 10px; padding: 6px 10px; border-radius: 6px; background: var(--idecs-kopf, linear-gradient(#3a4757, #26313d)); font-weight: 700; }
.idecs-kopf small { color: #9fb0c2; font-weight: 400; }
.idecs-zurueck { margin-right: auto; padding: 0 10px; color: #fff; font-size: 20px; text-decoration: none; }
.idecs-raster { display: grid; grid-template-columns: repeat(var(--idecs-spalten, 4), minmax(0, 1fr)); gap: var(--idecs-abstand, 6px); }
.idecs-platz { min-height: var(--idecs-hoehe, 52px); border-radius: 6px; background: rgba(18, 24, 32, .55); display: flex; }
.idecs-platz.ziel { outline: 2px dashed #f39c12; outline-offset: 1px; }
.idecs-frei, .idecs-knopf { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: var(--idecs-hoehe, 52px); padding: 4px 6px; border-radius: 6px; text-align: center; font-size: 13px; line-height: 1.2; }
.idecs-frei { color: #6f7f90; border: 1px solid #2a3440; }
.idecs-knopf { border: 1px solid #0e1319; border-bottom: 4px solid #e98a1a; background: linear-gradient(#3b4654, #222b35); background-size: cover; background-position: center; color: #fff; font-weight: 700; cursor: pointer; text-decoration: none; }
.idecs-knopf:hover { filter: brightness(1.15); }
.idecs-knopf.mit-bild { text-shadow: 0 1px 2px #000; }
.idecs-knopf.idecs-ordner { border-bottom-color: #3b82f6; }
.idecs-knopf.auto { border-bottom-style: dashed; }
.idecs-knopf .idecs-z2 { font-weight: 400; font-size: 12px; opacity: .9; }
.idecs-status { margin-top: 10px; padding: 6px 10px; border-radius: 6px; background: #121820; color: #b8c6d4; font-size: 13px; }
body.idecs-anordnen .idecs-knopf { cursor: grab; }
body.idecs-anordnen .idecs-knopf.gewaehlt { outline: 3px solid #f39c12; outline-offset: -3px; }
body.idecs-anordnen .idecs-platz { outline: 1px dashed #3b4654; outline-offset: -1px; }
.idecs-ablage { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.idecs-ablage p { flex-basis: 100%; margin: 0; }
.idecs-platz-ablage { width: 160px; }
.idecs-leer-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: -4px 0 12px; }
.idecs-leer-form[hidden] { display: none; }
.idecs-knopf.idecs-leer { border-bottom-color: #4b5867; }

/* Modul IDECS: Skin der IDECS (.skn, Update 135) – Panel in Originalgröße, skaliert */
.idecs-skin { position: relative; overflow: hidden; border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.idecs-skin-panel { position: absolute; left: 0; top: 0; transform-origin: 0 0; overflow: hidden; color: #fff; }
.idecs-skin-el { position: absolute; display: flex; align-items: center; justify-content: center; background-size: 100% 100%; background-repeat: no-repeat; overflow: hidden; white-space: nowrap; }
.idecs-raster-skin { position: absolute; grid-template-rows: repeat(var(--idecs-zeilen, 8), minmax(0, 1fr)); }
.idecs-raster-skin .idecs-platz, .idecs-raster-skin .idecs-frei, .idecs-raster-skin .idecs-knopf { min-height: 0; }
.idecs-raster-skin .idecs-platz { background: rgba(0, 0, 0, .18); }
.idecs-farbfeld { display: inline-block; width: 16px; height: 16px; border-radius: 3px; vertical-align: middle; border: 1px solid #0003; }
.idecs-skinbilder { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.idecs-skinbild { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; max-width: 260px; }
.idecs-skinbild img { max-width: 260px; max-height: 60px; border: 1px solid var(--line, #d9dde3); }
.idecs-export-vorschau { max-height: 420px; overflow: auto; padding: 10px 12px; border-radius: 6px; background: #111820; color: #d7e3ef; font-size: 12px; line-height: 1.45; white-space: pre; }
.idecs-abgleich { margin-bottom: 12px; padding: 10px 12px; border-radius: 8px; border: 1px solid; display: flex; flex-direction: column; gap: 4px; }
.idecs-abgleich.ok { border-color: #b7e1c4; background: #f1fbf4; }
.idecs-abgleich.offen { border-color: #f3d48a; background: #fff8e6; }
.idecs-abgleich ul { margin: 4px 0 0; padding-left: 18px; max-height: 220px; overflow: auto; }
/* Modul IDECS: Unterreiter der Verwaltung */
.idecs-subnav { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line, #e3e6ea); }
.idecs-subnav button { padding: 6px 12px; border: 1px solid var(--line, #d9dde3); border-radius: 999px; background: #fff; font-weight: 600; font-size: 13px; cursor: pointer; }
.idecs-subnav button.active { background: var(--red, #c8102e); border-color: var(--red, #c8102e); color: #fff; }
.idecs-subnav button.active .tab-count { background: rgba(255,255,255,.25); color: #fff; }
.idecs-subhinweis { margin: -4px 0 12px; }
.idecs-subpanel[hidden] { display: none; }
/* Modul IDECS: Parkplatz und Ordnerpfad (Update 138) */
.idecs-parkplatz { margin-top: 14px; padding: 10px; border: 2px dashed #c9ced6; border-radius: 10px; background: #fafbfc; }
.idecs-parkplatz.ziel { border-color: #f39c12; background: #fff8e6; }
.idecs-parkplatz .idecs-platz-ablage { min-height: 52px; }
.idecs-pfad { margin: 0 0 8px; }
.idecs-pfad a { text-decoration: none; }
/* Modul IDECS: Zurück-Taste im Ordner (fester Platz 1) */
.idecs-platz-zurueck { opacity: .95; }
.idecs-zurueck-taste { flex: 1; display: flex; align-items: center; justify-content: center; min-height: var(--idecs-hoehe, 52px); border-radius: 6px; border: 1px solid #0e1319; border-bottom: 4px solid #6b7a8c; background: linear-gradient(#55606e, #343d48); color: #fff; font-weight: 700; text-decoration: none; }
.idecs-raster-skin .idecs-zurueck-taste { min-height: 0; }
/* Modul IDECS: Papierkorb im Anordnen-Modus */
.idecs-papierkorb { margin: 0 0 12px; padding: 10px 12px; border: 2px dashed #e0a3ad; border-radius: 10px; background: #fff5f6; color: #8a1c2b; font-size: 13px; cursor: pointer; }
.idecs-papierkorb.ziel { border-color: #c8102e; background: #ffe3e7; }
.idecs-papierkorb[hidden] { display: none; }

/* Modul Unwetter / Einsatzstellen (Update 139) */
.uw-kopf { margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: #f2f4f7; }
.uw-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .uw-grid { grid-template-columns: minmax(0, 1fr); } }
.uw-rechts { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.uw-neu { margin-bottom: 12px; }
.uw-neu > summary { list-style: none; cursor: pointer; display: inline-flex; }
.uw-neu > summary::-webkit-details-marker { display: none; }
.uw-neu-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 12px; margin-top: 12px; }
.uw-neu-form label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 700; }
.uw-neu-form .uw-breit { grid-column: span 2; }
.uw-neu-form .uw-ganz { grid-column: 1 / -1; }
@media (max-width: 700px) { .uw-neu-form { grid-template-columns: minmax(0, 1fr); } .uw-neu-form .uw-breit { grid-column: auto; } }
.uw-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.uw-filter a { padding: 5px 10px; border: 1px solid var(--line, #d9dde3); border-radius: 999px; font-size: 13px; text-decoration: none; color: inherit; background: #fff; }
.uw-filter a.aktiv { background: #1f2937; border-color: #1f2937; color: #fff; }
.uw-stellen { display: flex; flex-direction: column; gap: 8px; }
.uw-stelle { padding: 10px 12px; border: 1px solid var(--line, #d9dde3); border-left: 6px solid #9aa4b2; border-radius: 8px; background: #fff; }
.uw-stelle.uw-p1 { border-left-color: #d1263a; }
.uw-stelle.uw-p2 { border-left-color: #f08a1c; }
.uw-stelle.uw-p3 { border-left-color: #2f9e57; }
.uw-stelle.ziel { outline: 3px dashed #2563eb; outline-offset: 2px; }
.uw-stelle.uw-s-geparkt, .uw-stelle.uw-s-abgeschlossen { opacity: .75; }
body.uw-zuweisen .uw-stelle:not(.uw-s-geparkt):not(.uw-s-abgeschlossen) { cursor: copy; outline: 1px dashed #93b4f5; }
.uw-stelle-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.uw-stelle-kopf a { text-decoration: none; }
.uw-prio-wahl { margin-left: auto; padding: 2px 6px; font-size: 12px; }
.uw-status { padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.uw-status.uw-s-angelegt { background: #eceff3; color: #374151; }
.uw-status.uw-s-disponiert { background: #dbeafe; color: #1d4ed8; }
.uw-status.uw-s-uebermittelt { background: #ede9fe; color: #6d28d9; }
.uw-status.uw-s-bearbeitung { background: #ffedd5; color: #c2410c; }
.uw-status.uw-s-geparkt { background: #fef9c3; color: #854d0e; }
.uw-status.uw-s-abgeschlossen { background: #dcfce7; color: #166534; }
.uw-stelle-text { margin: 6px 0; font-size: 14px; }
.uw-fz-zugewiesen { display: flex; flex-wrap: wrap; gap: 6px; min-height: 26px; }
.uw-fz-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: #e0ecff; font-size: 12px; font-weight: 700; }
.uw-fz-chip.geplant { background: #fff4d6; }
.uw-fz-chip button { border: 0; background: transparent; cursor: pointer; color: #6b7280; padding: 0 2px; }
.uw-drop-hinweis { font-size: 12px; color: #9aa4b2; border: 1px dashed #c9ced6; border-radius: 999px; padding: 3px 10px; }
.uw-stelle-aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.uw-fz-filter { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.uw-fahrzeuge { display: flex; flex-direction: column; gap: 6px; }
.uw-fz { padding: 8px 10px; border: 1px solid var(--line, #d9dde3); border-left: 5px solid #2f9e57; border-radius: 8px; background: #fff; cursor: grab; }
.uw-fz.belegt { border-left-color: #f08a1c; background: #fffaf3; }
.uw-fz.gewaehlt { outline: 3px solid #2563eb; outline-offset: -1px; }
.uw-fz[hidden] { display: none; }
.uw-fz-lage { font-size: 12px; margin-top: 3px; }
.uw-fz-lage.frei { color: #166534; font-weight: 700; }
.uw-fz-lage.geplant { color: #854d0e; }
.uw-ap-wahl { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 8px 10px; border-radius: 8px; background: #f6f7f9; }
.uw-ap-wahl label.check { font-weight: 400; flex-direction: row; }
.uw-ap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0; font-size: 12px; }
.uw-ap-edit summary { cursor: pointer; color: var(--blue, #2563eb); }
.uw-ap-liste { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 6px; padding: 8px; border-radius: 8px; background: #f6f7f9; }
.uw-ap-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #eef1f5; font-weight: 700; }
.uw-ap-pill.gesetzt { background: #e7f0ff; color: #1d4ed8; }
.uw-ap-edit > summary { list-style: none; }
.uw-ap-edit > summary::-webkit-details-marker { display: none; }
.uw-ap-edit[open] { flex-basis: 100%; }
.uw-berichte { margin: 6px 0; display: flex; flex-direction: column; gap: 4px; }
.uw-bericht { padding: 6px 10px; border-radius: 8px; background: #f0f7f1; border: 1px solid #cfe7d5; font-size: 13px; }
.uw-berichte.leer { padding: 4px 0; }
.uw-stand { float: right; }
/* Einsatzstelle: drei Spalten – Daten + Arbeitsplätze | Fahrzeuge | Fahrzeugbericht */
.uw-stelle-raster { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .8fr) minmax(0, 1.2fr); gap: 12px; margin-top: 6px; align-items: start; }
@media (max-width: 900px) { .uw-stelle-raster { grid-template-columns: minmax(0, 1fr); } }
.uw-sp-fz .uw-fz-zugewiesen { flex-direction: column; align-items: flex-start; }
.uw-sp-bericht .uw-berichte { margin-top: 0; }
.uw-ohne-bericht { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-weight: 400; }
.uw-neu-form .uw-ohne-bericht { flex-direction: row; font-size: 13px; }
.uw-neu-form .sw-suche { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 700; }
.uw-neu-form .sw-suche small { font-weight: 400; }
.uw-neu-form .sw-liste { top: 52px; font-weight: 400; }

/* Unwetter: Filter nach Fahrzeug (2.45.0) */
.uw-fz-wahl { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 0 0 10px; }
.uw-fz-wahl label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 700; }
.uw-fz-wahl select { min-width: 260px; max-width: 100%; }
.uw-fz-fokus { padding: 8px 12px; margin-bottom: 10px; border: 2px solid #1f2937; border-radius: var(--radius); background: #f8fafc; font-size: 14px; }
.uw-fz-frei { margin-top: 12px; }
.uw-fz-frei h3 { margin-top: 0; }
.uw-fz-frei-zeile { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-bottom: 1px solid var(--line, #e5e7eb); border-left: 4px solid transparent; }
.uw-fz-frei-zeile.uw-p1 { border-left-color: #dc2626; } .uw-fz-frei-zeile.uw-p2 { border-left-color: #f59e0b; } .uw-fz-frei-zeile.uw-p3 { border-left-color: #16a34a; }
.uw-fz-frei-zeile .uw-prio { min-width: 70px; font-size: 12px; white-space: nowrap; }
.uw-fz-frei-text { flex: 1; min-width: 0; font-size: 13px; }
.uw-fz-chip.treffer { outline: 2px solid #1f2937; outline-offset: 1px; }
.uw-fz.gefiltert { outline: 2px solid #1f2937; }
.uw-fz-finden { float: right; text-decoration: none; padding: 0 4px; }
@media (max-width: 700px) { .uw-fz-frei-zeile { flex-wrap: wrap; } .uw-fz-wahl select { min-width: 0; width: 100%; } }
.uw-fz-wahl .uw-suche { flex: 1 1 260px; }
.uw-fz-wahl .uw-suche input { width: 100%; }
.uw-fz-frei-zeile[hidden] { display: none; }
.uw-fz-chip.uw-fz-fertig { opacity: .6; }
.uw-fz-chip.uw-fz-bearbeitung small { color: #b91c1c; font-weight: 700; }
.uw-fz-typ { font-size: 11px; font-weight: 600; color: #475569; }
.uw-fms { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 4px; margin-right: 4px; border-radius: 4px; background: var(--st, #64748b); color: var(--st-text, #fff); font-size: 11px; font-weight: 800; }
/* Fahrzeugstatus von Hand: sichtbar nur das Kürzel, darüber unsichtbar die Auswahl mit den vollen Texten */
.uw-fms-hand { position: relative; cursor: pointer; }
.uw-fms-hand:focus-within { outline: 2px solid #1f2937; outline-offset: 1px; }
.uw-fms-hand select.uw-fms-wahl { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; font-size: 14px; min-width: 0; min-height: 0; }
.uw-fms-hand select.uw-fms-wahl option { background: #fff; color: #111; }
.uw-fms-leer { background: #cbd5e1; color: #334155; }
.uw-fz-n { white-space: nowrap; }
/* Admin › Fahrzeugstatus */
.fzs-vorschau { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 24px; padding: 0 6px; border-radius: 5px; background: var(--st, #64748b); color: var(--st-text, #fff); font-weight: 800; }
.fzs-tabelle input[type=color] { width: 44px; height: 30px; padding: 2px; }
.fzs-tabelle td { vertical-align: middle; }
/* Unwetter: Wehr-Knöpfe (Sortierungsnummer) über der Fahrzeugliste */
.uw-wehr-knoepfe { display: flex; flex-wrap: wrap; gap: 4px; }
.uw-wehr-knoepfe button { min-width: 38px; padding: 4px 8px; border: 1px solid var(--line, #d9dde3); border-radius: 6px; background: #fff; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; }
.uw-wehr-knoepfe button.aktiv { background: #1f2937; border-color: #1f2937; color: #fff; }
/* Unwetter: Meldungen (MAÜ und von Hand) */
.uw-meldungen { display: flex; flex-direction: column; gap: 3px; margin: 6px 0; padding: 6px 8px; border-radius: 6px; background: #f8fafc; font-size: 13px; }
.uw-meldung.manuell { border-left: 3px solid #7c3aed; padding-left: 6px; }
.uw-nicht-cobra { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: #ede9fe; color: #5b21b6; font-size: 11px; font-weight: 700; white-space: nowrap; }
.uw-chip-meldung { border: 0; background: none; padding: 0 2px; cursor: pointer; font-size: 13px; }
.uw-meldung-dlg { width: min(520px, calc(100vw - 32px)); border: 0; border-radius: 10px; padding: 18px 20px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.uw-meldung-dlg::backdrop { background: rgba(15, 23, 42, .45); }
.uw-meldung-dlg h3 { margin: 0 0 4px; }
.uw-meldung-dlg label { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; font-size: 13px; font-weight: 700; }
.uw-meldung-dlg textarea { width: 100%; font: inherit; }
.uw-meldung-knoepfe { display: flex; gap: 8px; }
.pill-meldung-manuell { background: #ede9fe; color: #5b21b6; font-size: 11px; white-space: nowrap; }
/* Unwetter: Fahrzeug nicht einsatzbereit (z. B. Status 6) */
.uw-fz.gesperrt { opacity: .7; background: #f8f8f8; border-left-color: #94a3b8; cursor: not-allowed; }
.uw-fz-lage.gesperrt { color: #991b1b; font-weight: 700; }
.uw-fz-sperre { margin-top: 4px; max-width: 100%; font-size: 12px; padding: 2px 4px; }
.uw-fz-sperren { float: right; margin-left: 4px; border: 0; background: none; cursor: pointer; font-size: 14px; opacity: .55; }
.uw-fz-sperren:hover { opacity: 1; }
.uw-fz-wieder { margin-left: 6px; padding: 1px 8px; border: 1px solid #16a34a; border-radius: 999px; background: #f0fdf4; color: #166534; font-size: 12px; font-weight: 700; cursor: pointer; }
/* Adresssuche (Update 145): Vorschläge unter dem Straßenfeld */
.strassen-suche { position: relative; }
.strassen-liste { top: 100%; margin-top: 2px; font-weight: 400; }
.strassen-liste li b { min-width: 0; flex: 1; color: inherit; }
.strassen-liste li span { color: var(--muted, #64748b); white-space: nowrap; }

/* Dateiauswahl mit Liste (assets/js/anhang-liste.js): gewählte Dateien vor dem Absenden entfernen */
.anhang-liste { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.anhang-liste li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fafbfc; font-size: 13px; }
.anhang-liste li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.anhang-liste .btn { flex: 0 0 auto; padding: 2px 8px; }
.anhang-hinweis { margin: 4px 0 0; }

/* Einsatz: seltene Aktionen im Menü „⚙ Einsatz“ (Separieren, Archivieren, Vorlage, Löschen, Nummern) */
.menu-list form.inline { display: block; }
.menu-eintrag {
    display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 4px; background: none; cursor: pointer;
    text-align: left; font: inherit; font-weight: 700; font-size: 13px; color: var(--ink);
}
.menu-eintrag:hover { background: #f3f6fb; color: var(--red); }
.menu-eintrag.menu-gefahr { color: var(--red-dark, #a50e26); }
.menu-eintrag.menu-gefahr:hover { background: var(--red-soft, #fdecef); }
.menu-list .check.small { display: block; padding: 4px 10px; font-weight: 400; }
.einsatz-menue .menu-list { min-width: 300px; max-height: 70vh; overflow-y: auto; }
.menu-nummern { display: grid; gap: 10px; padding: 4px 10px 8px; }
.nr-edit.nr-im-menue { width: auto; }
@media (max-width: 700px) {
    .einsatz-menue .menu-list { right: auto; left: 0; min-width: 0; width: calc(100vw - 40px); }
}

/* Kein automatisches Hineinzoomen auf iPhone/iPad beim Antippen von Eingabefeldern (Safari zoomt bei Schrift unter 16 px):
   auf Touch-Geräten und schmalen Bildschirmen alle Felder mit mindestens 16 px – Zwei-Finger-Zoom bleibt möglich */
@media (pointer: coarse), (max-width: 760px) {
    input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]),
    select, textarea { font-size: 16px !important; }
}

/* Knöpfe mit hidden-Attribut wirklich ausblenden – .btn setzt display und würde [hidden] sonst überdecken (z. B. „Kamera aus“ beim Scannen) */
.btn[hidden], button[hidden] { display: none !important; }

/* Kein Doppeltipp-Zoom (iPhone/iPad), z. B. beim schnellen Tippen auf ＋/−: schnelle Tipps sind Klicks – Zwei-Finger-Zoom bleibt möglich */
html, body, a, button, input, select, textarea, label, summary, .btn { touch-action: manipulation; }

/* Einsatz › Einsatzmittel: Stärke an der Einsatzstelle (Update 158, am Einsatz-Tablet gepflegt) */
.st-uebersicht { margin: 10px 14px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.st-uebersicht summary { cursor: pointer; }
.st-tabelle { margin-top: 8px; }
.st-tabelle .zahl { text-align: right; font-variant-numeric: tabular-nums; }
.st-tabelle tfoot td { font-weight: 700; border-top: 2px solid var(--line); }

/* Einsatz › Lage & Kräfte (Update 159) – gleiche Bausteine wie am Einsatz-Tablet (inc/lage.php), hell */
.lg-box { display: grid; gap: 12px; margin: 10px 0 16px; }
.lg-el { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 12px; border-radius: var(--radius); background: #fff8e0; border-left: 5px solid #c99a00; }
.lg-el-titel { font-weight: 700; color: #7a5b00; }
.lg-el-bem { flex-basis: 100%; }
.lg-leer { color: var(--muted); font-style: italic; }
.lg-kraefte { width: 100%; max-width: 760px; border-collapse: collapse; font-size: 14px; }
.lg-kraefte th, .lg-kraefte td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.lg-kraefte th { font-size: 12px; color: var(--muted); text-transform: uppercase; }
.lg-kraefte .zahl { text-align: right; font-variant-numeric: tabular-nums; width: 4em; }
.lg-kraefte tfoot td { font-weight: 700; border-top: 2px solid var(--ink); }
.lg-punkt { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; }
.lg-gruppen { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.lg-karte { display: grid; gap: 6px; align-content: start; padding: 10px 12px; border: 1px solid var(--line); border-left: 7px solid var(--lg, var(--muted)); border-radius: var(--radius); background: var(--panel); }
.lg-karte.lg-br { border-left-style: double; border-left-width: 9px; }
.lg-kopf { display: flex; align-items: baseline; gap: 10px; }
.lg-kopf b { font-size: 15px; }
.lg-st { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.lg-info, .lg-auftrag, .lg-bem { font-size: 13px; }
.lg-bem { color: var(--muted); }
.lg-fz { display: flex; flex-wrap: wrap; gap: 5px; }
.lg-chip { display: inline-flex; align-items: baseline; gap: 5px; padding: 3px 8px; border-left: 4px solid var(--st, var(--muted)); border-radius: 4px; background: #f1f2f4; font-size: 12px; }
.lg-chip em { font-style: normal; color: var(--muted); }

/* Einsatz › Lage & Kräfte: Stärke-Leiste in den Kacheln */
.lg-sl { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; max-width: 420px; }
.lg-sl-feld { display: flex; flex-direction: column; align-items: center; padding: 2px; border-radius: 4px; background: #f1f2f4; }
.lg-sl-feld b { font-size: 15px; font-variant-numeric: tabular-nums; }
.lg-sl-feld small { font-size: 10px; font-weight: 700; color: var(--muted); }
.lg-sl-feld.summe { background: var(--red-soft); }

/* Fahrzeug › Icon für die Karte (Update 161) */
.fz-icon-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 6px; }
.fz-icon-vorschau { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border: 1px solid var(--line); border-radius: var(--radius); background: #f6f7f9; font-size: 32px; }
.fz-icon-vorschau img { max-width: 60px; max-height: 60px; }
.lg-karte.lg-unter { border-left-style: dashed; }
.lg-inkl { font-size: 12px; color: var(--muted); }

/* Lagekarten auf der Einsatzseite (Version 2.98) – nur ansehen */
.lka { margin: 6px 0 4px; }
.lka-reiter { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; }
.lka-reiter button { flex-shrink: 0; padding: 6px 12px; border: 1px solid var(--line, #d0d5dc); border-radius: 8px; background: #fff; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.lka-reiter button.an { background: #1d4f91; border-color: #1d4f91; color: #fff; }
.lka-flaeche { position: relative; border-radius: 8px; overflow: hidden; isolation: isolate; }
.lka-karte { height: 62vh; min-height: 360px; background: #e9edf2; }
.lka-karte[hidden] { display: none; }
.lka-ansichten { display: flex; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.lka-ansichten button { padding: 5px 9px; border: 0; background: #fff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.lka-ansichten button.an { background: #1d4f91; color: #fff; }
.lka-m { background: none; border: 0; }
.lka-e { font-size: 26px; text-align: center; line-height: 34px; }
.lka-el { display: flex; align-items: center; justify-content: center; gap: 2px; border-radius: 6px; background: #f5c518; color: #1d2430; font-size: 13px; box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.lka-a span { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border: 3px solid var(--lg, #3b82f6); border-radius: 6px; background: #fff; color: #1d2430; font-size: 12px; font-weight: 800; box-sizing: border-box; }
.lka-fz { width: 44px; height: 44px; margin: 2px; display: flex; align-items: center; justify-content: center; border: 3px solid var(--lg, #e3203d); border-radius: 8px; background: #fff; font-size: 22px; box-sizing: border-box; box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.lka-fz img { width: 100% !important; height: 100% !important; max-width: none !important; object-fit: contain; }
.lka-name { position: absolute; top: 50px; left: 50%; transform: translateX(-50%); padding: 1px 5px; border-radius: 4px; background: rgba(15,17,20,.85); color: #fff; font-size: 11px; white-space: nowrap; }
.lka-tz .lka-name { top: 46px; }
.lka-tz-bild { position: relative; width: 44px; height: 46px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.55)); }
.lka-tz-bild svg { display: block; }
.lka-tz-st { position: absolute; right: -14px; bottom: 2px; padding: 0 3px; border-radius: 3px; background: #fff; color: #111; font-size: 10px; font-weight: 800; white-space: nowrap; box-shadow: 0 0 0 1px #111; }
.lka-text-m span { font-weight: 800; font-size: 14px; white-space: nowrap; text-shadow: 0 0 3px #fff, 0 0 3px #fff; }
.lka-beschr span { display: inline-block; transform: translate(-50%, -130%); padding: 2px 6px; border-radius: 4px; border-left: 4px solid var(--lg, #333); background: rgba(255,255,255,.95); color: #1d2430; font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.lka-info small { display: block; color: #6b7480; }
.lka-info .lka-masse { margin-top: 4px; font-weight: 700; }
.lka-info .lka-text { margin-top: 4px; }
.lka-tz-kopf { display: flex; align-items: center; gap: 8px; }
.lka-fz-tab, .lka-info table.lka-fz { width: 100%; margin-top: 4px; border-collapse: collapse; font-size: 12px; }
.lka-info table.lka-fz td { padding: 2px 4px; border-top: 1px solid #eee; }
.lka-abzug { margin-left: auto; flex-shrink: 0; padding: 6px 12px; border: 1px solid #1d4f91; border-radius: 8px; background: #e8f0fb; color: #1d4f91; font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; }
.lka-abzug:disabled { opacity: .6; cursor: wait; }
.lka-zoomhinweis { position: absolute; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; font-weight: 700; pointer-events: none; opacity: 0; transition: opacity .2s; }
.lka-zoomhinweis.an { opacity: 1; }
.lg-druck-leiste { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }

/* Modul Feuer Software (Update 174) */
.fs-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 8px; }
.fs-leiste .fs-suche { flex: 1 1 220px; max-width: 360px; }
.fs-leiste select, .fs-leiste input[type=date] { max-width: 220px; }
.fs-filter { display: contents; }
.fs-info { margin-bottom: 6px; }
.fs-tabelle { overflow-x: auto; }
.fs-tabelle .table td { vertical-align: top; }
.fs-tabelle th[data-fs-sort] { cursor: pointer; white-space: nowrap; }
.fs-tabelle th[data-fs-sort]:hover { color: var(--red); }
.fs-tabelle tr.fs-klick { cursor: pointer; }
.fs-tabelle tr.fs-klick:hover td, .fs-tabelle tr.fs-klick.offen td { background: #f6f8fb; }
.fs-tabelle tr.fs-detail > td { background: #fafbfc; padding: 10px 14px 16px; }
.fs-u { display: block; color: var(--muted); font-size: 12px; }
.fs-marke { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 700; white-space: nowrap; background: #eef0f3; color: #4a525e; }
.fs-marke.fs-gruen { background: #e3f6ea; color: #157a3d; }
.fs-marke.fs-gelb { background: #fff4d6; color: #8a6400; }
.fs-marke.fs-rot { background: #fde4e6; color: #b4142c; }
.fs-marke.fs-blau { background: #e3edfb; color: #1d4f91; }
.fs-abschnitt { margin: 4px 0 14px; }
.fs-abschnitt h4 { margin: 0 0 6px; font-size: 14px; }
.fs-abschnitt .table td, .fs-abschnitt .table th { padding: 6px 10px; }
.fs-text { white-space: normal; line-height: 1.45; }
.fs-kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; }
.fs-kv dt { font-weight: 700; color: #4a525e; }
.fs-kv dd { margin: 0; }
/* Feuer Software: Popup mit allen Angaben eines Eintrags */
.fs-popup { width: min(860px, calc(100vw - 24px)); max-height: calc(100dvh - 40px); padding: 0; border: 0; border-radius: 12px; box-shadow: 0 18px 48px rgba(0,0,0,.35); }
.fs-popup::backdrop { background: rgba(15,20,30,.5); }
.fs-pop-karte { display: flex; flex-direction: column; max-height: calc(100dvh - 40px); }
.fs-pop-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.fs-pop-kopf h3 { margin: 2px 0 0; font-size: 18px; }
.fs-pop-zu { border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--muted); }
.fs-pop-inhalt { padding: 14px 18px; overflow-y: auto; }
.fs-pop-kv { padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.fs-pop-kv dd { overflow-wrap: anywhere; }
.fs-pop-fuss { padding: 10px 18px; border-top: 1px solid var(--line); text-align: right; }
.fz-issi-vorschlag { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; } /* Funk-ID aus Feuer Software übernehmen (Update 175) */
.fs-veraltet { color: #8a6400; } /* Live-Status älter als 5 Minuten (Update 176) */
.text-danger { color: #b4142c; }
/* Modul ISSI (Update 177): Ablagefläche für die CSV-Datei, Werkzeugleiste im Abgleich */
.issi-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 28px 16px; margin-bottom: 12px;
    border: 2px dashed var(--line); border-radius: var(--radius); text-align: center; cursor: pointer; background: #fafbfc; position: relative; }
.issi-drop.aktiv { border-color: var(--red); background: var(--red-soft); }
.issi-drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.issi-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.issi-leiste .list-search { flex: 1 1 260px; margin: 0; }
.issi-tabelle td { font-size: 13px; padding: 8px 10px; }
/* Fahrzeugkarte im Modul Feuerwehr (Version 2.107.0) – Marker wie in der Lagekarte (.lka-fz, .lka-name) */
.fwk-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 10px 0; }
.fwk-gh { font-size: 20px; line-height: 26px; text-align: center; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.lka-fz { position: relative; }
.fwk-status { position: absolute; right: -8px; bottom: -8px; min-width: 18px; height: 18px; padding: 0 3px; border-radius: 9px; color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #fff; box-sizing: border-box; }
.fwk-live::before { content: ''; position: absolute; left: -6px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: #1f9d4c; box-shadow: 0 0 0 2px #fff; }
/* Modul Feuerwehr › Fahrzeuge: Filter mit/ohne ISSI (Version 2.107.2) */
.fw-filterleiste { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); }
.fw-filterleiste .list-search { flex: 1 1 260px; margin: 0; }
.table tr.fw-aus { display: none !important; }
/* Einsatzseite › Einsatzmittel: aktueller Status (Farben zentral, Admin › Fahrzeugstatus) und Status von Hand (Update 178) */
.em-st { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 5px; background: var(--st, #64748b); color: var(--st-text, #fff); font-size: 12px; font-weight: 800; text-align: center; }
.em-st-wahl { margin-top: 4px; padding: 3px 6px; font-size: 12px; max-width: 220px; }
.pill-fs { background: #e3edfb; color: #1d4f91; margin-left: 4px; } /* Wehrlisten: mit Feuer Software verknüpft (Version 2.111.2) */
/* Sichter: Ansicht Ruhe / Einsatz getrennt (Update 182) */
.si-ansicht + .si-ansicht { margin-top: 6px; }
.si-art { display: inline-block; align-self: center; min-width: 62px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.si-zustand { margin-bottom: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.si-zustand-einsatz { color: var(--red); }
.si-mehr { margin-top: 6px; font-size: 12px; } .si-mehr summary { cursor: pointer; color: var(--muted); } .si-mehr .si-ansicht { margin-top: 6px; }
.si-fswehr { margin-top: 8px; gap: 10px 16px; } .si-fswehr label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; } .si-fswehr select { padding: 4px 6px; font-size: 13px; }
/* Bildschirmverwaltung: Filter nach Standort (Update 185) */
.bv-filterleiste { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); }
.bv-filterleiste .list-search { flex: 1 1 260px; margin: 0; padding: 0; border: 0; }
.table tr.bv-aus { display: none !important; }
.table tr.bv-gr-aus { display: none !important; }
.bv-gruppe-wahl { min-width: 140px; padding: 5px 8px; font-size: 13px; }
.bv-gruppe-wahl.bv-ok { border-color: #2e9d55; box-shadow: 0 0 0 3px rgba(46, 157, 85, .2); }
.bv-gruppe-wahl.bv-fehler { border-color: var(--red); }
/* Monitorliste: Monitorgruppen als Unterreiter unter der Suche (Version 2.134.0) */
.bv-gruppen-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.bv-gruppen-tabs button { display: inline-flex; align-items: center; padding: 6px 12px; border: 1px solid var(--line); border-radius: 16px; background: #fff;
    color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.bv-gruppen-tabs button:hover { color: var(--ink); }
.bv-gruppen-tabs button.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.bv-gruppen-tabs .tab-count { margin-left: 6px; padding: 1px 7px; border-radius: 10px; background: #f1f2f4; color: var(--muted); font-size: 11px; }
.bv-gruppen-tabs button.active .tab-count { background: rgba(255, 255, 255, .2); color: #fff; }

/* Einsatzseite › Atemschutz (Version 2.125.0): Listenansicht wie der Ausdruck */
.asu-ep { margin: 0 0 14px; border: 1px solid var(--line); border-left: 6px solid #9aa1ab; border-radius: 10px; overflow: hidden; }
.asu-ep-gruen { border-left-color: #22c55e; } .asu-ep-orange { border-left-color: #f59e0b; }
.asu-ep-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 9px 12px; background: #f4f5f7; }
.asu-ep-gruen .asu-ep-kopf { background: #eaf7ef; } .asu-ep-orange .asu-ep-kopf { background: #fff4e0; }
.asu-ep-kopf b { font-size: 16px; } .asu-ep-kopf > span { color: #5b6472; font-size: 13px; }
.asu-ep-status { margin-left: auto; font-weight: 700; color: #1d2430 !important; }
.asu-ep-info { padding: 8px 12px; font-size: 13px; line-height: 1.6; }
.asu-ep-info span { display: inline-block; min-width: 64px; color: #6b7480; }
.asu-ep-inhalt { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 420px); gap: 12px; align-items: start; padding: 0 12px 12px; }
.asu-ep-tab { font-size: 13px; } .asu-ep-tab th small { display: block; font-weight: 400; color: #6b7480; }
.asu-ep-tab td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.asu-ep-tab td.asu-gruen { background: #e3f6ea; } .asu-ep-tab td.asu-orange { background: #fdefd3; } .asu-ep-tab td.asu-rot { background: #fbdde2; }
.asu-ep-dia { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.asu-ep-dia .bg { fill: #e3f6ea; } .asu-ep-dia .bo { fill: #fdefd3; } .asu-ep-dia .br { fill: #fbdde2; }
.asu-ep-dia text { font-size: 10px; fill: #6b7480; }
.asu-ep-dia .soll { stroke: #c8102e; stroke-width: 1.5; stroke-dasharray: 5 3; }
.asu-ep-dia polyline { fill: none; stroke: #1d2430; stroke-width: 2; } .asu-ep-dia circle { fill: #1d2430; }
@media (max-width: 900px) { .asu-ep-inhalt { grid-template-columns: minmax(0, 1fr); } }
/* Einsatzseite: Schäden je Abschnitt (Update 196) */
.lg-schaeden { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 4px; font-size: 13px; }
.lg-schaden { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 2px; border-radius: 8px; background: #fdecef; }
.lg-schaden:not([data-tz]) { padding-left: 8px; }
.lgk-info-sch { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 4px; font-size: 13px; }
.lgk-info-sch span { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px 1px 2px; border-radius: 7px; background: #fdecef; color: #1d2430; }
/* Abschnitt: Schäden links, Einsatzmittel rechts (Version 2.127.3) */
.lg-zwei { display: grid; grid-template-columns: minmax(140px, 2fr) minmax(0, 3fr); gap: 10px; align-items: start; margin-top: 4px; }
.lg-zwei > .lg-fz { margin-top: 0; }
.lg-sch-links { flex-direction: column; align-items: stretch; margin-top: 0; }
.lg-sch-links .lg-schaden { width: 100%; }
@media (max-width: 600px) { .lg-zwei { grid-template-columns: minmax(0, 1fr); } }
/* Wind unten rechts in den Karten (Version 2.128.1) */
.lgk-wind { display: flex; align-items: center; gap: 6px; padding: 4px 8px 4px 4px; border-radius: 10px; background: rgba(255, 255, 255, .9); box-shadow: 0 1px 5px rgba(0, 0, 0, .35); color: #1d2430; font-size: 12px; line-height: 1.25; }
.lgk-wind svg { display: block; flex: 0 0 auto; }
.lgk-wind b { font-size: 13px; }
.asu-ep-meld { padding: 0 12px 12px; font-size: 13px; } .asu-ep-meld b { display: block; margin-bottom: 4px; } /* Update 198 */

/* Bilder in der Lagekarte (Update 201): Vorschau-Symbol, geöffnet in der eingestellten Größe (hängt unten mittig am Punkt), Griff ◢ zum Vergrößern, Vollbild */
.lgk-bi-m { background: none; border: 0; }
.lgk-bi { position: relative; box-sizing: border-box; background: #eef0f3; cursor: pointer; }
.lgk-bi img { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; pointer-events: none; }
.lgk-bi-zu { width: 46px; height: 46px; border: 3px solid #fff; border-radius: 8px; box-shadow: 0 1px 5px rgba(0,0,0,.55); }
.lgk-bi-zu img { border-radius: 5px; }
.lgk-bi-kamera { position: absolute; right: -9px; bottom: -9px; width: 22px; height: 22px; border-radius: 50%; background: #1d4f91; color: #fff; font-size: 12px; line-height: 22px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.lgk-bi.fehlt img { visibility: hidden; }
.lgk-bi.fehlt::before { content: '🖼'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 20px; color: #9aa1ab; }
.lgk-bi-auf { border: 3px solid #fff; border-radius: 8px; overflow: hidden; background: #111; box-shadow: 0 3px 14px rgba(0,0,0,.55); cursor: zoom-in; }
.lgk-bi-auf img { object-fit: contain; }
.lgk-bi-auf.bearb { border-color: #c8451c; cursor: move; }
.lgk-bi-kopf { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 6px; padding: 4px 4px 10px 8px; background: linear-gradient(rgba(0,0,0,.72), rgba(0,0,0,0)); color: #fff; font-size: 13px; }
.lgk-bi-kopf b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 2px #000; }
.lgk-bi-kopf span { display: flex; gap: 4px; flex-shrink: 0; }
.lgk-bi-kopf button { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 6px; background: rgba(255,255,255,.92); color: #1d2430; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; touch-action: manipulation; }
.lgk-bi-griff { position: absolute; right: 0; bottom: 0; width: 38px; height: 38px; display: flex; align-items: flex-end; justify-content: flex-end; padding: 0 4px 2px 0; box-sizing: border-box; border-top-left-radius: 12px; background: #c8451c; color: #fff; font-size: 20px; line-height: 1; cursor: nwse-resize; touch-action: none; }
.lgk-bi-spitze { position: absolute; left: 50%; bottom: 0; width: 0; height: 0; margin-left: -9px; border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 10px solid #fff; filter: drop-shadow(0 2px 1px rgba(0,0,0,.35)); }
.lgk-bi-voll { position: fixed; inset: 0; z-index: 2100; display: flex; align-items: center; justify-content: center; background: rgba(5,6,8,.95); }
.lgk-bi-voll img { max-width: 100%; max-height: 100%; object-fit: contain; touch-action: pinch-zoom; }
.lgk-bi-voll-kopf { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px 24px; background: linear-gradient(rgba(0,0,0,.78), rgba(0,0,0,0)); color: #fff; }
.lgk-bi-voll-titel { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lgk-bi-voll-titel b { font-size: 18px; }
.lgk-bi-voll-titel small { font-size: 12px; opacity: .85; }
.lgk-bi-voll-zu { flex-shrink: 0; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: #1d2430; font-size: 20px; font-weight: 700; cursor: pointer; }
.lgk-bi-voll-notiz { position: absolute; left: 12px; right: 12px; bottom: 12px; max-height: 30vh; overflow: auto; padding: 8px 12px; border-radius: 8px; background: rgba(0,0,0,.72); color: #fff; font-size: 14px; white-space: pre-wrap; }
.lgk-bi-voll-lade { position: absolute; color: #fff; font-size: 15px; }

.lka-bi-sicht { padding: 5px 9px; border: 0; border-radius: 6px; background: #fff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.lka-bi-sicht.aus { opacity: .5; text-decoration: line-through; }

/* Galerie je Ort (Update 202): Anzahl am Symbol, ‹ › am geöffneten Bild, Aufnahmezeit unten, Blättern im Vollbild */
.lgk-bi-kopf small { margin-left: 4px; font-weight: 400; opacity: .9; }
.lgk-bi-pfeil { position: absolute; top: 50%; width: 36px; height: 52px; margin-top: -26px; padding: 0; border: 0; border-radius: 8px; background: rgba(0,0,0,.45); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; touch-action: manipulation; }
.lgk-bi-pfeil.links { left: 4px; } .lgk-bi-pfeil.rechts { right: 4px; }
.lgk-bi-auf.bearb .lgk-bi-pfeil.rechts { right: 4px; margin-top: -40px; }
.lgk-bi-fuss { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 8px 4px; background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.72)); color: #fff; font-size: 12px; font-weight: 700; text-shadow: 0 1px 2px #000; pointer-events: none; }
.lgk-bi-auf.bearb .lgk-bi-fuss { padding-right: 44px; }
.lgk-bi-voll { touch-action: pinch-zoom; }
.lgk-bi-voll-pfeil { position: absolute; top: 50%; width: 56px; height: 80px; margin-top: -40px; padding: 0; border: 0; border-radius: 10px; background: rgba(255,255,255,.18); color: #fff; font-size: 44px; line-height: 1; cursor: pointer; }
.lgk-bi-voll-pfeil.links { left: 10px; } .lgk-bi-voll-pfeil.rechts { right: 10px; }

/* Leaflet setzt Bilder in Markern auf width: auto (höhere Priorität) – Vorschau sonst in Originalbreite über den Rahmen hinaus (Version 2.137.1) */
.leaflet-marker-pane .lgk-bi img { width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; padding: 0 !important; }
.leaflet-marker-pane .lgk-bi-zu img { object-fit: cover; }
.leaflet-marker-pane .lgk-bi-auf img { object-fit: contain; }

/* Team-Postfach (Update 208): Mail beim Senden an ein Ticket anhängen, Entwurf mit Bearbeiter */
.mp-ticket-wahl { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; font-weight: 600; }
.mp-ticket-wahl select { font-weight: 400; }
.mp-ticket-wahl small { font-weight: 400; }
.mp-entwurf-wer { align-self: center; }

/* Version 2.146.12: Admin-Ansicht oben nur als Schalter (ohne Text) */
.admin-switch.admin-switch-kompakt { padding: 6px 8px; gap: 0; }

/* Version 2.146.14: Mail-Liste – letzte Mail nicht unter der schwebenden Leiste, Papierkorb je Zeile, „geöffnet von“ */
.mp-liste-scroll::after { content: ''; display: block; height: calc(96px + env(safe-area-inset-bottom)); }
.mp-zeile-akt { display: flex; gap: 12px; margin-top: 8px; justify-content: flex-end; } /* 2.146.17: eigene Zeile unter dem Datum, mehr Abstand */
.mp-zeit-zelle { white-space: nowrap; }
.mp-ich-gelesen { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-right: 6px; border-radius: 50%;
    background: #e3f1e6; color: #1e7b34; font-size: 11px; font-weight: 700; vertical-align: 1px; cursor: help; }
.mp-zeile-k { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 8px;
    background: var(--panel); color: var(--muted); font-size: 15px; cursor: pointer; touch-action: manipulation; }
.mp-zeile-k .mp-svg { width: 17px; height: 17px; }
.mp-zeile-k:hover { color: var(--ink); border-color: #c5cad2; }
.mp-zeile-k.mp-zeile-weg:hover { color: #fff; background: var(--red); border-color: var(--red); }
.mp-geoeffnet { cursor: help; }
@media (max-width: 700px) {
    .mp-zeile-akt { margin: 8px 0 0; gap: 14px; }
    .mp-zeile-k { width: 34px; height: 34px; }
}

/* Version 2.147.0: Info-Mail – Pressetext von der KI formulieren lassen */
.presse-ki { margin: 14px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.presse-ki h3 { margin-top: 0; }
.presse-ki input[type="text"], .presse-ki textarea { width: 100%; }
#ki-ergebnis { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
