/* Farben wie RocketPrint / RocketStats (immer dunkel) */
:root {
  color-scheme: dark;
  --seite: #0F0F0F;
  --flaeche: #1A1A1A;
  --flaeche-2: #262626;
  --flaeche-3: #303030;
  --text: #FFFFFF;
  --text-2: #C8C8C8;
  --text-leise: #9A9A9A;
  --gitter: #2A2A2A;
  --achse: #3A3A3A;
  --rand: #2E2E2E;
  --s1: #FF7A00;        /* RocketPrint-Orange */
  --s1-hover: #FF9433;
  --s2: #4C9BFF;
  --gut: #3DDC84;
  --gelb: #FFC233;
  --schlecht: #FF5A5A;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--seite);
  color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
}
h2 { font-size: 15px; font-weight: 600; margin: 0 0 12px; }
h2.abstand { margin-top: 24px; }
h3 { font-size: 13.5px; font-weight: 600; margin: 16px 0 8px; color: var(--text-2); }
code { font: 12px ui-monospace, Consolas, monospace; background: var(--flaeche-2); padding: 1px 5px; border-radius: 4px; }
button, select, input, textarea { font: inherit; color: inherit; }
a { color: var(--s1); }

.kopf {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 24px 8px;
}
.marke { display: flex; align-items: flex-end; gap: 14px; }
.marke img { height: 26px; display: block; }
.marke span { color: var(--text-leise); font-size: 13px; }
.kopf-rechts { display: flex; align-items: center; gap: 10px; }
.lokal { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--rand); padding: 4px 10px; border-radius: 99px; background: var(--flaeche); }
.lokal .punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--gut); }
.suche-kopf { width: 260px; }

.tabs { display: flex; gap: 2px; padding: 0 24px; border-bottom: 1px solid var(--rand); overflow-x: auto; }
.tabs button {
  border: 0; background: none; padding: 10px 14px; cursor: pointer; color: var(--text-2);
  border-bottom: 2px solid transparent; white-space: nowrap; border-radius: 0;
}
.tabs button:hover { color: var(--text); filter: none; }
.tabs button.aktiv { color: var(--text); border-bottom-color: var(--s1); font-weight: 600; }
.tabs .zahl-badge { background: var(--schlecht); color: #000; border-radius: 99px; font-size: 11px; padding: 0 6px; margin-left: 6px; font-weight: 600; }

.filter { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; }
.filter label { display: flex; align-items: center; gap: 6px; color: var(--text-2); }
select, input[type=search], input[type=text], input[type=datetime-local], input[type=email], input[type=tel], textarea {
  background: var(--flaeche); border: 1px solid var(--rand); border-radius: 6px; padding: 6px 9px;
}
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--s1); }
textarea { resize: vertical; min-height: 64px; width: 100%; }
.filter-info { color: var(--text-leise); font-size: 12px; }

button { cursor: pointer; border-radius: 6px; border: 1px solid transparent; padding: 6px 13px;
  background: var(--s1); color: #000; }
button:hover { filter: brightness(1.12); }
button:disabled { opacity: .45; cursor: default; filter: none; }
button.leise, .knopf.leise { background: var(--flaeche); color: var(--text); border-color: var(--rand); }
button.leise:hover, .knopf.leise:hover { background: var(--flaeche-2); }
button.gefahr { background: none; color: var(--schlecht); border-color: rgba(255, 90, 90, .45); }
button.gefahr:hover { background: rgba(255, 90, 90, .12); }
button.klein { padding: 3px 9px; font-size: 12.5px; }
.knopf { display: inline-block; cursor: pointer; border-radius: 6px; padding: 6px 13px; border: 1px solid var(--rand); }
.zurueck { background: none; color: var(--text-2); border: 0; padding: 4px 0; margin-bottom: 10px; }
.zurueck:hover { color: var(--s1); filter: none; }

main { padding: 18px 24px 40px; }
.tab { display: none; }
.tab.aktiv { display: block; }

.karte-box {
  background: var(--flaeche); border: 1px solid var(--rand); border-radius: 10px;
  padding: 18px 20px; margin-bottom: 16px; min-width: 0;
}
.box-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.box-kopf h2 { margin: 0 auto 0 0; }
.raster2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; margin-bottom: 16px; }
.raster2 > .karte-box { margin-bottom: 0; }
.hinweis { color: var(--text-2); font-size: 12.5px; margin: -6px 0 12px; }
.leise { color: var(--text-leise); }
.leer { color: var(--text-leise); padding: 16px 0; text-align: center; }

.seg { display: inline-flex; border: 1px solid var(--rand); border-radius: 7px; overflow: hidden; flex-wrap: wrap; }
.seg button { background: var(--flaeche); color: var(--text-2); border: 0; border-radius: 0; padding: 5px 11px; }
.seg button + button { border-left: 1px solid var(--rand); }
.seg button.aktiv { background: var(--flaeche-3); color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--s1); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 10px; padding: 14px 16px; text-align: left; color: var(--text); }
button.kpi:hover { background: var(--flaeche-2); filter: none; }
.kpi .t { color: var(--text-2); font-size: 12.5px; }
.kpi .w { font-size: 24px; font-weight: 600; margin-top: 2px; }
.kpi .u { color: var(--text-leise); font-size: 12px; }
.kpi.warn .w { color: var(--schlecht); }

/* Zustände */
.st { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 12.5px;
  border-radius: 99px; padding: 1px 9px 1px 7px; border: 1px solid var(--rand); background: var(--flaeche-2); }
.st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.st-ok { color: var(--gut); }
.st-fehler { color: var(--gelb); }
.st-reparatur { color: var(--s2); }
.st-defekt { color: var(--schlecht); border-color: rgba(255, 90, 90, .5); }
.st-fehlt { color: #000; background: var(--schlecht); border-color: var(--schlecht); font-weight: 600; }
.st-fehlt::before { background: #000; }
.ort { color: var(--text-2); }
.ort b { color: var(--text); font-weight: 600; }
.marke-heim { color: var(--gut); }
.marke-weg { color: var(--s1); }
.marke-zusatz { color: var(--s2); }
.typ { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-leise);
  border: 1px solid var(--rand); border-radius: 4px; padding: 0 5px; }
.typ.merch { color: var(--s2); border-color: rgba(76, 155, 255, .4); }

/* Tabellen */
.tabelle-wrap { overflow-x: auto; }
.tabelle { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tabelle th { text-align: left; font-weight: 600; color: var(--text-2); font-size: 12.5px; padding: 6px 10px;
  border-bottom: 1px solid var(--achse); white-space: nowrap; user-select: none; }
.tabelle th.sort { cursor: pointer; }
.tabelle th.sort:hover { color: var(--text); }
.tabelle td { padding: 7px 10px; border-bottom: 1px solid var(--gitter); vertical-align: middle; }
.tabelle tbody tr:hover { background: var(--flaeche-2); }
.tabelle tr.klick { cursor: pointer; }
.tabelle tr.gewaehlt { background: rgba(255, 122, 0, .08); box-shadow: inset 3px 0 0 var(--s1); }
.tabelle td.cb, .tabelle th.cb { width: 34px; padding-right: 0; }
.tabelle td.nr { font-weight: 600; white-space: nowrap; }
.tabelle .einzug { display: inline-block; color: var(--text-leise); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--s1); cursor: pointer; vertical-align: middle; }

/* Auswahl-Leiste */
.auswahl { position: sticky; bottom: 12px; z-index: 5; display: none; align-items: center; flex-wrap: wrap; gap: 8px;
  background: var(--flaeche-2); border: 1px solid var(--s1); border-radius: 10px; padding: 10px 14px; margin-top: 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .5); }
.auswahl.an { display: flex; }
.auswahl .anzahl { font-weight: 600; margin-right: auto; }

/* Koffer-Karten */
.koffer-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.koffer-spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.koffer-spalte > h3 { margin: 0 0 10px; color: var(--text); font-size: 15px; padding-bottom: 6px; border-bottom: 2px solid var(--s1); }
.koffer-spalte .koffer-raster { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
@media (max-width: 760px) { .koffer-spalten { grid-template-columns: 1fr; } }
.koffer-karte { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 10px; overflow: hidden;
  cursor: pointer; text-align: left; padding: 0; color: var(--text); display: flex; flex-direction: column; }
.koffer-karte:hover { border-color: var(--s1); filter: none; }
.koffer-karte .bild { aspect-ratio: 4 / 3; background: var(--flaeche-2) center / cover no-repeat; display: grid; place-items: center;
  color: var(--text-leise); font-size: 12px; }
.koffer-karte .info { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.koffer-karte .titel { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.koffer-karte .zeile { font-size: 12.5px; color: var(--text-2); }
.koffer-karte .probleme { color: var(--schlecht); font-size: 12.5px; }

/* Detail */
.detail-kopf { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.detail-kopf .titelbild { width: 280px; aspect-ratio: 4 / 3; border-radius: 8px; background: var(--flaeche-2) center / cover no-repeat;
  display: grid; place-items: center; color: var(--text-leise); cursor: pointer; flex: none; }
.detail-kopf .daten { flex: 1; min-width: 260px; }
.detail-kopf h1 { font-size: 22px; margin: 0 0 4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.felder { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0; }
.felder dt { color: var(--text-leise); }
.felder dd { margin: 0; white-space: pre-wrap; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* Fotos */
.galerie { display: flex; flex-wrap: wrap; gap: 8px; }
.galerie .bild { width: 120px; height: 90px; border-radius: 6px; background: var(--flaeche-2) center / cover no-repeat;
  cursor: pointer; position: relative; border: 1px solid var(--rand); }
.galerie .bild span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 11px; padding: 2px 5px;
  background: rgba(0, 0, 0, .6); border-radius: 0 0 6px 6px; }
.galerie .bild.titel { outline: 2px solid var(--s1); }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 2px dashed var(--achse); border-radius: 10px; padding: 22px 16px; cursor: pointer; text-align: center;
  color: var(--text-2); }
.drop strong { color: var(--text); font-size: 14.5px; }
.drop.ueber { border-color: var(--s1); background: var(--flaeche-2); }
.drop.klein { padding: 10px; width: 120px; height: 90px; font-size: 12px; }

/* Verlauf */
.feed { display: flex; flex-direction: column; }
.eintrag { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--gitter); }
.eintrag .icon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px;
  background: var(--flaeche-2); color: var(--text-2); border: 1px solid var(--rand); }
.eintrag.e-status .icon { color: var(--gelb); }
.eintrag.e-bewegung .icon { color: var(--s1); }
.eintrag.e-kommentar .icon { color: var(--text); }
.eintrag .meta { font-size: 12px; color: var(--text-leise); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.eintrag .meta b { color: var(--text-2); font-weight: 600; }
.eintrag .txt { white-space: pre-wrap; margin-top: 2px; }
.eintrag .ziel { color: var(--s1); cursor: pointer; }
.eintrag .ziel:hover { text-decoration: underline; }
.eintrag .galerie { margin-top: 6px; }
.eintrag .galerie .bild { width: 90px; height: 68px; }
.eintrag .x { margin-left: auto; }
.neuer-eintrag { display: grid; gap: 8px; margin-bottom: 8px; }
.neuer-eintrag .reihe { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.neuer-eintrag .reihe label { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13px; }
.vorschau { display: flex; gap: 6px; flex-wrap: wrap; }
.vorschau img { width: 64px; height: 48px; object-fit: cover; border-radius: 4px; border: 1px solid var(--rand); }
.x { background: none; color: var(--text-leise); border: 0; padding: 2px 6px; }
.x:hover { color: var(--schlecht); filter: none; }

/* Wo ist was */
.wo-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.wo { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 10px; padding: 14px 16px; }
.wo h3 { margin: 0 0 8px; color: var(--text); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.wo h3 .art { font-size: 11px; color: var(--text-leise); font-weight: 400; text-transform: uppercase; letter-spacing: .04em; }
.wo ul { list-style: none; margin: 0; padding: 0; }
.wo li { padding: 4px 0; border-top: 1px solid var(--gitter); display: flex; gap: 8px; align-items: center; cursor: pointer; }
.wo li:hover { color: var(--s1); }
.wo li.drin { font-size: 13px; border-top-style: dashed; }
.drin-pfeil { color: var(--s1); opacity: .8; }
.wo li .leise { margin-left: auto; font-size: 12px; }

/* Dialog */
.dialog-hg { position: fixed; inset: 0; background: rgba(0, 0, 0, .65); display: grid; place-items: center; z-index: 50; padding: 16px; }
.dialog { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 12px; width: min(560px, 100%);
  max-height: calc(100vh - 32px); overflow: auto; padding: 20px 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.dialog.breit { width: min(860px, 100%); }
.dialog h2 { font-size: 17px; margin-bottom: 14px; }
.dialog .formular { display: grid; grid-template-columns: max-content 1fr; gap: 10px 14px; align-items: center; }
.dialog .formular label { color: var(--text-2); }
.dialog .formular input, .dialog .formular select, .dialog .formular textarea { width: 100%; }
.dialog .formular .voll { grid-column: 1 / -1; }
.dialog .unten { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.dialog .unten .links { margin-right: auto; }
.dialog .meldung { color: var(--schlecht); min-height: 1em; margin-top: 10px; font-size: 13px; }
.dialog .text { color: var(--text-2); white-space: pre-wrap; }
.zielliste { max-height: 320px; overflow: auto; border: 1px solid var(--rand); border-radius: 8px; margin-top: 8px; }
.zielliste button { display: flex; width: 100%; text-align: left; background: none; color: var(--text); border: 0; border-radius: 0;
  border-bottom: 1px solid var(--gitter); padding: 8px 12px; gap: 10px; align-items: center; }
.zielliste button:hover { background: var(--flaeche-2); filter: none; }
.zielliste button.aktiv { background: rgba(255, 122, 0, .14); box-shadow: inset 3px 0 0 var(--s1); }
.zielliste .leise { margin-left: auto; font-size: 12px; }
.zielliste label { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--gitter); cursor: pointer; }
.zielliste label:hover { background: var(--flaeche-2); }
.wo h3[data-halter] { cursor: pointer; }
.wo h3[data-halter]:hover { color: var(--s1); }

/* Bildbetrachter */
.betrachter { position: fixed; inset: 0; background: rgba(0, 0, 0, .92); z-index: 60; display: flex; flex-direction: column; }
.betrachter .leiste { display: flex; align-items: center; gap: 10px; padding: 10px 16px; color: var(--text-2); }
.betrachter .leiste .t { margin-right: auto; }
.betrachter .flaeche { flex: 1; display: grid; place-items: center; min-height: 0; padding: 0 60px 20px; position: relative; }
.betrachter img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.betrachter .pfeil { position: absolute; top: 50%; transform: translateY(-50%); background: var(--flaeche); color: var(--text);
  border: 1px solid var(--rand); font-size: 20px; width: 42px; height: 42px; border-radius: 50%; padding: 0; }
.betrachter .pfeil.l { left: 10px; }
.betrachter .pfeil.r { right: 10px; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 70; background: var(--flaeche-2);
  border: 1px solid var(--rand); border-left: 3px solid var(--gut); padding: 10px 16px; border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .5); max-width: 90vw; }
.toast.fehler { border-left-color: var(--schlecht); }

.erinnerung { background: rgba(255, 122, 0, .10); border: 1px solid rgba(255, 122, 0, .45); border-radius: 10px;
  padding: 12px 16px; margin-bottom: 16px; }
.erinnerung:empty { display: none; }
.schritt { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--s1); color: #000; font-size: 13px; margin-right: 8px; }
.log { max-height: 260px; overflow: auto; font-size: 12.5px; }
.log div { padding: 3px 0; border-bottom: 1px solid var(--gitter); }
.ok { color: var(--gut); }
.fehler { color: var(--schlecht); }
.liste { margin: 0; padding-left: 18px; color: var(--text-2); }
.liste li { margin-bottom: 4px; }
.status-z { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--gitter); }
.status-z span:last-child { text-align: right; word-break: break-all; }
.einstellung { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.einstellung input { flex: 1; min-width: 200px; }

/* Geplante Übergaben und Druckvorschau */
.tabelle tr.tag-zeile td { background: var(--flaeche-2); font-weight: 600; color: var(--text); padding-top: 9px; }
.tabelle tr.tag-zeile.ueberfaellig td { color: var(--schlecht); }
.tabelle tr.erledigt td { color: var(--text-leise); }
.dialog label.wahl { display: flex; align-items: center; gap: 8px; color: var(--text); padding: 2px 0; }
.dialog label.wahl input { width: auto; }
.aus { display: none !important; }
/* Wartezeichen: drehender Kreis im Knopf und oben im Kopf */
@keyframes drehen { to { transform: rotate(360deg); } }
.kreisel, button.dreht::before { content: ""; display: inline-block; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: drehen .8s linear infinite;
  vertical-align: -2px; margin-right: 8px; }
button.dreht { opacity: .85; cursor: progress; }
.arbeitet { display: none; align-items: center; font-size: 12.5px; color: var(--s1); border: 1px solid rgba(255, 122, 0, .45);
  background: rgba(255, 122, 0, .10); border-radius: 99px; padding: 4px 12px; white-space: nowrap; flex-shrink: 0; }
.arbeitet.an { display: inline-flex; }
/* Ziehen & Ablegen in der Inhaltsliste */
.tabelle tr[draggable="true"] td.nr { cursor: grab; }
.tabelle tr.dnd-zieht { opacity: .4; }
.tabelle tr.dnd-davor td { box-shadow: inset 0 3px 0 var(--s1); }
.tabelle tr.dnd-danach td { box-shadow: inset 0 -3px 0 var(--s1); }
.tabelle tr.dnd-hinein td { background: rgba(255, 122, 0, .16); }
.tabelle tr.dnd-hinein td:first-child { box-shadow: inset 3px 0 0 var(--s1); }
.code { font: 600 14px ui-monospace, Consolas, monospace; letter-spacing: .18em; color: var(--s1); background: var(--flaeche-2);
  border: 1px solid var(--rand); border-radius: 5px; padding: 1px 7px; }
.seg.pruef button { min-width: 64px; }
.seg.pruef button[data-v="1"].aktiv { background: rgba(61, 220, 132, .22); color: var(--gut); box-shadow: inset 0 -2px 0 var(--gut); }
.seg.pruef button[data-v="0"].aktiv { background: rgba(255, 90, 90, .22); color: var(--schlecht); box-shadow: inset 0 -2px 0 var(--schlecht); }
.druck-vorschau { width: 100%; height: 68vh; border: 1px solid var(--rand); border-radius: 6px; background: #fff; }
input[type=date], input[type=time] { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 6px; padding: 6px 9px; color-scheme: dark; }

/* Sperre: gemeinsamer Ordner (Synology Drive) */
#sperre { padding: 10px 24px 0; display: grid; gap: 8px; }
#sperre:empty { display: none; }
.sperre-leiste { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: rgba(76, 155, 255, .10);
  border: 1px solid rgba(76, 155, 255, .5); border-radius: 10px; padding: 10px 14px; }
.sperre-leiste .t { flex: 1; min-width: 260px; }
.sperre-leiste .k { display: flex; gap: 8px; flex-wrap: wrap; }
.sperre-leiste.fehler { background: rgba(255, 90, 90, .10); border-color: rgba(255, 90, 90, .55); color: var(--text); }
/* Nur ansehen: alles ausblenden, was Daten ändert */
body.nur-lesen :is([data-akt$="-neu"], [data-akt$="-bearbeiten"]:not([data-akt="sperre-bearbeiten"]), [data-akt$="-loeschen"],
  [data-akt$="-bewegen"], [data-akt$="-status"], [data-akt$="-heimat"], [data-akt$="-zurueck"], [data-akt="koffer-einlegen"],
  [data-akt="sicherung"], [data-akt="planung-erledigt"], [data-akt="koffer-pruefen"], [data-akt="termin-erledigt"],
  [data-akt="reparatur-start"], [data-akt="reparatur-ende"], [data-akt="artikel-kopieren"], [data-akt="zusatznummern"], [data-akt="kategorie-umbenennen"], .einstellung, .neuer-eintrag, .drop, .auswahl, .cb, .betrachter [data-b="loeschen"]) { display: none !important; }

@media (max-width: 700px) {
  #sperre { padding: 10px 16px 0; }
  .kopf, .tabs { padding-left: 16px; padding-right: 16px; }
  .kopf { flex-wrap: wrap; }
  .suche-kopf { width: 100%; }
  main { padding: 14px 16px 32px; }
  .raster2 { grid-template-columns: 1fr; }
  .detail-kopf .titelbild { width: 100%; }
  .dialog .formular { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- Karte & Logistik */
.karte-raster { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, 1fr); gap: 16px; align-items: start; }
.karte-links { position: sticky; top: 10px; }
.karte-rechts > .karte-box:last-child { margin-bottom: 0; }
svg.karte { width: 100%; height: min(60vh, 680px); display: block; background: #121417; border-radius: 8px; border: 1px solid var(--rand); }
.k-land { fill: #1d2126; stroke: #3a4048; stroke-width: 0.6; }
.k-land:hover { fill: #22272d; }
.k-fahrt { stroke: var(--s1); fill: none; opacity: .9; cursor: pointer; }
.k-fahrt.hell, .k-fahrt:hover { stroke: #fff; opacity: 1; }
.k-event path { fill: var(--gut); stroke: #0c2a1a; stroke-width: 0.8; }
.k-event .k-loch { fill: #0c2a1a; }
.k-person { cursor: pointer; }
.k-person circle { fill: var(--s2); stroke: #0d1b2e; stroke-width: 1; }
.k-person text, .k-koffer text { font: 700 6px "Segoe UI", sans-serif; fill: #0b0b0b; text-anchor: middle; pointer-events: none; }
.k-person text { fill: #fff; }
.k-ort { cursor: pointer; }
.k-ort path { fill: #8a8a8a; stroke: #111; stroke-width: 0.8; }
.k-ort.lager path { fill: #e8e8e8; }
.k-koffer { cursor: pointer; }
.k-koffer rect { fill: var(--s1); stroke: #111; stroke-width: 0.7; }
.k-koffer.merch rect { fill: #9b6bff; }
.k-koffer text { font-size: 5px; }
.karte-legende { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12px; color: var(--text-2); }
.karte-legende i { display: inline-block; width: 11px; height: 11px; margin-right: 6px; vertical-align: -1px; border-radius: 3px; }
.lg-foto { background: var(--s2); border-radius: 50% !important; }
.lg-lager { background: #e8e8e8; }
.lg-kf { background: var(--s1); }
.lg-km { background: #9b6bff; }
.lg-ev { background: var(--gut); border-radius: 50% 50% 50% 0 !important; transform: rotate(-45deg); }
.lg-fahrt { height: 0 !important; border-top: 2px dashed var(--s1); border-radius: 0 !important; width: 18px !important; }
ul.fahrten { list-style: none; margin: 0 0 6px; padding: 0; }
ul.fahrten li { border: 1px solid var(--rand); border-radius: 8px; padding: 9px 11px; margin-bottom: 8px; background: var(--flaeche-2); display: grid; gap: 3px; }
ul.fahrten li.hell { border-color: var(--s1); }
ul.fahrten li button { justify-self: start; margin-top: 4px; }
.art-foto, .art-event, .art-ort { font-size: 12px; margin-left: 6px; font-weight: 600; }
.art-foto { color: var(--s1); }
.art-event { color: var(--gut); }
.art-ort { color: var(--text-2); }
.kchip { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 1px 6px; border-radius: 5px; margin-right: 4px; background: var(--flaeche-3); color: var(--text-2); }
.kchip.foto { color: var(--s1); }
.kchip.merch { color: #b394ff; }
.kchip.neu { outline: 1px dashed currentColor; }
.kchip.fehlt { background: rgba(255, 90, 90, .18); color: var(--schlecht); }
ul.hinweisliste { margin: 0; padding-left: 18px; color: var(--gelb); }
ul.hinweisliste li { margin: 3px 0; }
@media (max-width: 1100px) { .karte-raster { grid-template-columns: 1fr; } .karte-links { position: static; } }
.k-person.eigen circle { fill: #1d2126; stroke: var(--s2); stroke-width: 1.6; }
.lg-eigen { border: 2px solid var(--s2); border-radius: 50% !important; width: 9px !important; height: 9px !important; }
svg.karte { cursor: grab; user-select: none; }
svg.karte.zieht { cursor: grabbing; }
.k-versatz { stroke: var(--s2); opacity: .55; }
.folge { font-size: 12.5px; color: var(--gut); }
.wahl-leiste { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; margin-bottom: 4px;
  background: var(--flaeche-2); border: 1px solid var(--rand); border-radius: 8px; font-size: 12.5px; color: var(--text-2); }
.tour { border: 1px solid rgba(255, 122, 0, .45); background: rgba(255, 122, 0, .07); border-radius: 8px; padding: 9px 12px; margin-bottom: 8px; }
.tour-kopf { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tour-kopf button, .tour-kopf .geplant { margin-left: auto; }
.tour ol { margin: 6px 0 2px; padding-left: 20px; font-size: 13px; }
.tour ol li { margin: 2px 0; }
.fahrt-kopf { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
ul.fahrten li.gewaehlt { border-color: var(--s1); }
.geplant { color: var(--gut); font-size: 12.5px; font-weight: 600; }
.dialog > .text { white-space: pre-line; }
.lokal.warn .punkt { background: var(--gelb); }
.lokal.warn { color: var(--gelb); }
#karte-tip { position: fixed; z-index: 50; display: none; pointer-events: none; max-width: 320px; white-space: pre-line;
  background: #0b0b0b; color: var(--text); border: 1px solid var(--s1); border-radius: 7px; padding: 7px 10px; font-size: 12.5px;
  line-height: 1.45; box-shadow: 0 6px 20px rgba(0, 0, 0, .5); }
.k-event { cursor: help; }
.notiz-auftrag, .notiz-danach { display: block; }
.notiz-danach { margin-top: 3px; font-weight: 600; }
.notiz-liste { margin: 1px 0 0 16px; padding: 0; }
.fw-liste { display: grid; gap: 4px; max-height: 50vh; overflow: auto; }
.wochen-leiste { display: flex; align-items: stretch; gap: 6px; margin-top: 10px; }
.wochen-leiste > button { flex: none; }
.wochen { display: flex; gap: 6px; overflow-x: auto; flex: 1; scroll-behavior: smooth; }
.woche { flex: 1 0 120px; display: grid; gap: 1px; text-align: left; background: var(--flaeche-2); border: 1px solid var(--rand);
  border-radius: 8px; padding: 6px 10px; color: var(--text-2); font-size: 12px; }
.woche b { color: var(--text); font-size: 12.5px; }
.woche .leise { font-size: 11px; }
.woche.aktiv { border-color: var(--s1); background: rgba(255, 122, 0, .1); box-shadow: inset 0 -2px 0 var(--s1); }
.fahrer-grund { font-size: 12.5px; color: var(--gelb); }
.tab-zahl { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--s1); color: #111;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; vertical-align: 1px; }
.hinweis-box { border-color: rgba(255, 122, 0, .55); }
.hinweis-box .hinweisliste { color: var(--text); }
.hinweis-box .hinweisliste li { margin: 5px 0; }
.hinweis-box .hinweisliste li.neu::marker { color: var(--gut); }
.hinweis-box .hinweisliste li.entfaellt { color: var(--text-2); text-decoration: line-through; }
.hinweis-box .hinweisliste button { margin-left: 6px; }
.kleidung { font-size: 12.5px; color: #8fb8ff; }
ul.werbe-liste { list-style: none; margin: 0; padding: 0; }
ul.werbe-liste > li { border: 1px solid var(--rand); border-radius: 8px; padding: 9px 11px; margin-bottom: 8px; background: var(--flaeche-2); display: grid; gap: 4px; }
.werbe-teile { display: flex; flex-wrap: wrap; gap: 4px; }
.werbe-wahl { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--text-2); }
.werbe-wahl select { margin-left: 4px; max-width: 190px; }
table.bedarf td, table.bedarf th { padding: 4px 6px; }
.warnung-zukunft { margin: 0 0 10px; padding: 8px 11px; border-radius: 8px; border: 1px solid #e0a020; background: rgba(224,160,32,.14); color: var(--text); font-size: 13px; }
.werbe-vorschlag { font-size: 12.5px; color: var(--text-2); display: grid; gap: 3px; border-left: 3px solid #e0a020; padding-left: 8px; }
.werbe-vorschlag button { margin-left: 6px; }
.werbe-ok { font-size: 12.5px; color: #3fae6a; }
.werbe-ok button { margin-left: 6px; }
.werbe-nachkauf { border: 1px solid var(--rand); border-radius: 8px; padding: 8px 11px; margin-bottom: 10px; font-size: 13px; background: var(--flaeche-2); }
.fahrer-wahl { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }
.fahrer-wahl select { margin-left: 4px; max-width: 230px; }
.fahrer-wahl.eigen select { border-color: #3867d6; }
.typ.werbe { background: #3867d6; color: #fff; }
.werbe-ding { white-space: nowrap; }
table.werbe-abhaken td { padding: 5px 8px; }
td.buendel > div { display: flex; align-items: center; gap: 6px; margin: 1px 0; }
.buendel-knoepfe { opacity: .55; display: inline-flex; gap: 2px; }
td.buendel > div:hover .buendel-knoepfe { opacity: 1; }
.werbe-mit { font-size: 12.5px; color: var(--text-2); }

/* von Hand geänderter Fahrplan-Vorschlag */
.geaendert { font-size: 11.5px; color: #7a4fc4; background: #f1eafc; border-radius: 4px; padding: 1px 6px; margin-left: 4px; white-space: nowrap; }
.werbe-mit a { font-size: 12px; }

/* Online (Webserver): was nur am Computer geht, ausblenden */
body.online [data-akt="datenordner"], body.online [data-akt="ordner-oeffnen"],
body.online [data-akt="vorlage"], body.online #sperre, body.online #quellen-anzeige { display: none !important; }

/* Seite für Fotografen (online, nur ansehen) */
.fotograf-seite main { max-width: 640px; margin: 0 auto; padding: 16px; }
.fotograf-seite .karte-box { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 10px; padding: 10px 14px; margin: 12px 0; }
.fotograf-seite .f-zeile { padding: 7px 0; border-bottom: 1px solid var(--gitter); line-height: 1.4; }
.fotograf-seite .f-zeile:last-child { border-bottom: 0; }
@media (max-width: 560px) { .fotograf-seite .marke span { display: none; } .fotograf-seite .marke img { height: auto; width: min(240px, calc(100vw - 32px)); } .fotograf-seite .kopf { padding-left: 16px; padding-right: 16px; } }
.anmelde-box { max-width: 420px; margin: 40px auto !important; }
.anmelde-box .formular { margin-top: 12px; }
.anmelde-box .formular { display: grid; grid-template-columns: max-content 1fr; gap: 10px 14px; align-items: center; }
.anmelde-box input { background: var(--flaeche-2); border: 1px solid var(--rand); border-radius: 6px; padding: 8px 10px; min-width: 0; }
.anmelde-box button { justify-self: start; }
.anmelde-box .formular[hidden] { display: none; }
