/* LokPlan – schlichtes Design */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #f5b400;
  --accent-ink: #1f1600;
  --danger: #dc2626;
  --frueh: #e9a600;
  --spaet: #2f7de1;
  --nacht: #7b4fd6;
  --radius: 14px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e131c;
    --surface: #161c27;
    --surface-2: #1d2431;
    --text: #e8ebf0;
    --muted: #8b94a3;
    --line: #262e3b;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  line-height: 1.4;
}
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

input, textarea {
  font: inherit; color: var(--text);
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  min-height: 44px;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .7; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; }
input[type="time"], input[type="date"] { padding-inline: 10px; font-variant-numeric: tabular-nums; }
label { display: block; font-size: .8rem; color: var(--muted); font-weight: 600; margin-bottom: 14px; }
label > input, label > textarea { margin-top: 5px; font-weight: 400; font-size: 1rem; }

.muted { color: var(--muted); margin: 2px 0 0; font-size: .9rem; }
.hint { color: var(--muted); font-size: .85rem; margin: -6px 0 14px; }
.error { color: var(--danger); font-size: .9rem; margin: 0 0 14px; }
.spacer { flex: 1; }
.pre { white-space: pre-wrap; }
.label { font-size: .75rem; color: var(--muted); font-weight: 600; }

/* ---------- Buttons */
.btn {
  border: 1px solid var(--line); background: var(--surface);
  padding: 10px 16px; border-radius: 10px; font-weight: 600; min-height: 44px;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.danger { color: var(--danger); }
.btn.danger.confirm { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.small { padding: 6px 12px; min-height: 36px; font-size: .88rem; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .6; }
.link { background: none; border: 0; color: var(--muted); padding: 8px; font-weight: 600; }
.link:hover { color: var(--text); }
.link.danger { color: var(--danger); }
.icon-btn {
  background: none; border: 0; font-size: 1.4rem; line-height: 1; color: var(--muted);
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* ---------- Banner / Toast */
.banner {
  background: #92400e; color: #fff; text-align: center; padding: 6px 12px; font-size: .85rem;
  padding-top: calc(6px + env(safe-area-inset-top));
}
.toast {
  position: fixed; left: 50%; bottom: calc(150px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 10px;
  z-index: 50; font-size: .9rem; max-width: 90vw; text-align: center;
}

/* ---------- Anmeldung */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 360px; text-align: center; }
.auth-card form { text-align: left; margin-top: 28px; }
.auth-logo { border-radius: 16px; }
.auth-card h1 { font-size: 1.6rem; margin-top: 14px; font-weight: 700; }
.auth-card #auth-toggle { margin-top: 8px; }
.auth-extern { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; font-size: .9rem; }
.auth-extern a { color: var(--muted); font-weight: 600; text-decoration: none; }
.auth-extern a:hover { color: var(--text); text-decoration: underline; }
a.menu-item { color: inherit; text-decoration: none; }

/* ---------- Kopfzeile */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: 14px 16px 10px; padding-top: calc(14px + env(safe-area-inset-top));
}
.topbar h1 { font-size: 1.5rem; font-weight: 700; max-width: 728px; margin: 0 auto; }

.content {
  max-width: 760px; margin: 0 auto;
  padding: 6px 16px calc(160px + env(safe-area-inset-bottom));
}
.section-title { font-size: .8rem; font-weight: 600; color: var(--muted); margin: 22px 2px 8px; }
.section-title:first-child { margin-top: 6px; }

/* ---------- Untere Navigation */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px max(8px, calc(50% - 380px)) calc(6px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 4px; text-decoration: none; color: var(--muted); font-size: .7rem; font-weight: 600;
}
.tabbar svg {
  width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.tabbar a.active { color: var(--text); }
.tabbar a.active svg { stroke-width: 2.2; }

/* ---------- Startseite */
.greeting { font-size: 1.1rem; font-weight: 600; margin: 0 2px; }
#today-line { margin: 0 2px 20px; }

.next-shift {
  width: 100%; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-bottom: 4px;
  display: flex; flex-direction: column; gap: 2px;
}
.next-shift .label { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.next-shift .label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--spaet)); }
.next-shift strong { font-size: 1.2rem; font-weight: 700; }
.next-shift .when { color: var(--muted); }
.next-shift .big-time { font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: 10px 0 2px; }

/* ---------- Zeitleiste (Stil Verbindungsdetails) */
.tl { --tl-line: #a3a9b2; --tl-time: 52px; }
@media (prefers-color-scheme: dark) { .tl { --tl-line: #59616e; } }
.tl-row {
  display: grid; grid-template-columns: 22px 1fr; column-gap: 10px; align-items: center;
}
.tl-time { text-align: right; font-weight: 700; font-size: 1.02rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-rail { position: relative; align-self: stretch; }
.tl-rail::before {
  content: ""; position: absolute; left: 50%; width: 2px; margin-left: -1px; top: 0; bottom: 0;
  background: var(--tl-line);
}
.tl-stop { min-height: 34px; }
.tl-stop .tl-rail::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px;
  border-radius: 50%; border: 2px solid var(--tl-line); background: var(--surface); box-sizing: border-box;
}
.tl-stop.start .tl-rail::before { top: 50%; }
.tl-stop.end .tl-rail::before { bottom: 50%; }
.tl-name { font-weight: 700; font-size: 1.02rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-right { color: var(--muted); font-size: .88rem; white-space: nowrap; }
.tl-dur { text-align: right; font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-seg .tl-body { padding: 12px 0 14px; }
.tl-band { background: var(--surface-2); margin: 4px -18px; padding: 0 18px; }
.tl-band .tl-rail::before { background: none; width: 0; margin-left: -1px; border-left: 2px dotted var(--tl-line); }
.tl-band .tl-body { padding: 11px 0; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.tl-band-icon { font-size: 1.1rem; line-height: 1; }
.tl-train { display: flex; gap: 10px; align-items: flex-start; }
.z-icon svg { width: 30px; height: 30px; display: block; }
.tl-train { align-items: center; }
.z-icon { --z-bg: #5f6672; }
@media (prefers-color-scheme: dark) { .z-icon { --z-bg: #4a5260; } }
.z-box { fill: var(--z-bg); }
.z-lok { fill: none; stroke: #fff; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.z-fill { fill: #fff; }
.tl-zug { font-weight: 600; }
.tl-nach { color: var(--muted); font-size: .9rem; }
.tl-hint { margin: 8px 0 0 36px; font-size: .85rem; color: var(--muted); }
.tl-mini { display: flex; align-items: center; gap: 8px; font-size: .92rem; min-width: 0; }
.tl-mini + .tl-mini { margin-top: 6px; }
.tl-mini .z-icon svg { width: 20px; height: 20px; }
.tl-mini b { font-weight: 600; }

/* ---------- Startseite: Schichtkarten */
.trip {
  display: block; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px 8px; margin-bottom: 12px;
}
.trip:hover { border-color: color-mix(in srgb, var(--line), var(--muted) 40%); }
.trip { padding: 14px 16px 12px; }
.trip-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 14px; }
.trip-date { font-size: .88rem; color: var(--muted); font-weight: 600; }
.trip-name { display: flex; align-items: center; gap: 7px; font-weight: 700; }
.trip-name .dot { margin: 0; flex: none; }

/* waagerechter Zeitstrahl wie im Suchergebnis der DB-App */
.strahl-row { display: flex; align-items: center; gap: 12px; }
.strahl-zeit { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.strahl-zeit sup { font-size: .62rem; font-weight: 600; color: var(--muted); margin-left: 2px; }
.strahl { position: relative; flex: 1; height: 2px; background: var(--muted); opacity: .9; }
.strahl::before, .strahl::after {
  content: ""; position: absolute; top: 50%; width: 9px; height: 9px; margin-top: -4.5px;
  border-radius: 50%; border: 2px solid var(--muted); background: var(--surface); box-sizing: border-box;
}
.strahl::before { left: -4px; }
.strahl::after { right: -4px; }
.strahl-halt {
  position: absolute; top: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px;
  border-radius: 50%; background: var(--muted);
}
.strahl-dauer {
  position: absolute; left: 50%; bottom: 7px; transform: translateX(-50%);
  font-size: .72rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.strahl-orte { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; font-size: .88rem; color: var(--muted); }
.strahl-orte span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strahl-orte span:last-child { text-align: right; }
.strahl-orte.mitte { justify-content: center; }

.trip-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line);
}
.trip-zuege { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.zug-chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: .82rem; font-weight: 600;
  padding: 3px 8px 3px 4px; border-radius: 7px; background: var(--surface-2);
}
.zug-chip .z-icon svg { width: 18px; height: 18px; }
.zug-mehr { font-size: .82rem; color: var(--muted); align-self: center; }
.trip-lok { font-size: .82rem; color: var(--muted); white-space: nowrap; margin-left: auto; }

/* ---------- Detail: Kopfzeile wie „Verbindungsdetails“ */
.d-info { display: flex; flex-direction: column; gap: 4px; padding: 0 18px 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.d-info-row { display: flex; justify-content: space-between; gap: 10px; }
#detail-dialog .sheet-body { padding-top: 14px; }
#d-notiz-wrap { margin-top: 18px; }
.tag {
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  background: var(--accent); color: var(--accent-ink); border-radius: 5px; padding: 1px 6px;
}

/* Schichtfarbe als Variable */
.frueh { --c: var(--frueh); }
.spaet { --c: var(--spaet); }
.nacht { --c: var(--nacht); }

/* ---------- Schichtkarten */
.card {
  display: block; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 8px;
}
.card:hover, .next-shift:hover { border-color: color-mix(in srgb, var(--line), var(--muted) 40%); }
.card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card-top strong { font-size: 1.05rem; font-weight: 650; display: flex; align-items: center; gap: 9px; }
.card-top strong::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--spaet)); flex: none; }
.time { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.card .time { color: var(--muted); font-weight: 500; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0 0 17px; font-size: .87rem; color: var(--muted); }
.meta b { color: var(--text); font-weight: 600; }
.badge { color: var(--muted); font-size: .85rem; font-weight: 600; margin-left: 4px; }
.empty { color: var(--muted); text-align: center; padding: 32px 16px; }

/* ---------- Kalender */
.month-nav { display: flex; align-items: center; gap: 2px; margin: 0 0 10px; }
.month-nav h2 { font-size: 1.1rem; font-weight: 650; min-width: 8.5em; text-align: center; }
.calendar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.weekdays, .grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.weekdays span { text-align: center; font-size: .72rem; font-weight: 600; color: var(--muted); padding: 4px 0 6px; }
.day {
  min-height: 62px; border: 0; border-radius: 10px; background: none;
  padding: 4px 2px; display: flex; flex-direction: column; align-items: center; gap: 3px; overflow: hidden;
}
.day:hover { background: var(--surface-2); }
.day .num {
  font-size: .85rem; font-weight: 500; width: 26px; height: 26px; line-height: 26px; text-align: center;
  border-radius: 50%; font-variant-numeric: tabular-nums;
}
.day.other .num, .day.other .mini { opacity: .35; }
.day.today .num { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.day.selected { background: var(--surface-2); }
.mini {
  align-self: stretch; min-width: 0; text-align: center;
  font-size: .6rem; font-weight: 600; line-height: 1.3; border-radius: 4px; padding: 1px 1px;
  white-space: nowrap; overflow: hidden; text-overflow: clip;
  color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent);
}
@media (prefers-color-scheme: dark) {
  .mini { color: color-mix(in srgb, var(--c) 65%, #fff); background: color-mix(in srgb, var(--c) 30%, transparent); }
}
.mini .t { display: none; }
.more { font-size: .62rem; color: var(--muted); }
.legend { display: flex; gap: 16px; justify-content: center; font-size: .75rem; color: var(--muted); padding: 10px 0 4px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--c); }
@media (min-width: 640px) {
  .calendar { padding: 12px; }
  .day { min-height: 86px; padding: 6px 4px; }
  .mini { font-size: .72rem; padding: 2px 6px; text-align: left; text-overflow: ellipsis; }
  .mini .t { display: inline; opacity: .8; }
}

/* ---------- Profil */
.profile-head { display: flex; align-items: center; gap: 14px; margin: 4px 0 22px; }
.profile-head h2 { font-size: 1.15rem; font-weight: 650; }
.avatar {
  width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-size: 1.3rem; font-weight: 700; background: var(--surface-2); color: var(--text); border: 1px solid var(--line);
}
.menu-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.menu-list .hint { margin: 0; padding: 0 16px 12px; }
.menu-item {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  border-bottom: 1px solid var(--line); padding: 15px 16px; font-weight: 500;
}
.menu-item:last-child { border-bottom: 0; }
button.menu-item:hover, details.menu-item summary:hover { background: var(--surface-2); }
.menu-item.danger { color: var(--danger); }
details.menu-item { padding: 0; }
details.menu-item summary { cursor: pointer; padding: 15px 16px; }
details.menu-item form { margin: 4px 16px 16px; }

/* ---------- Plus-Knopf */
.fab {
  position: fixed; right: 18px; bottom: calc(80px + env(safe-area-inset-bottom));
  width: 56px; height: 56px; border-radius: 50%; border: 0;
  background: var(--accent); color: var(--accent-ink); font-size: 1.8rem; line-height: 1;
  box-shadow: 0 4px 12px rgba(0,0,0,.18); z-index: 20;
}
@media (min-width: 800px) { .fab { right: calc(50% - 370px); } }

/* ---------- Dialoge */
dialog.sheet {
  border: 0; padding: 0; color: var(--text); background: var(--surface);
  width: 100%; max-width: 600px; max-height: 92dvh;
  border-radius: 18px 18px 0 0; margin: auto auto 0;
  display: none; flex-direction: column;
}
dialog.sheet[open] { display: flex; animation: up .2s ease-out; }
dialog.sheet > form { display: flex; flex-direction: column; min-height: 0; max-height: 92dvh; }
dialog::backdrop { background: rgba(0, 0, 0, .45); }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
@media (min-width: 700px) { dialog.sheet { border-radius: 18px; margin: auto; } }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 18px 18px 8px; }
.sheet-head h2 { font-size: 1.25rem; font-weight: 700; }
.sheet-head .icon-btn { font-size: 1rem; }
.sheet-body { padding: 8px 18px 12px; overflow-y: auto; flex: 1; }
.sheet-foot {
  display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line);
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}
.small-sheet { max-width: 420px; }

.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > label { flex: 1 1 88px; min-width: 0; }
.row > label.grow { flex: 2 1 180px; }
.row > label:has(> input[type="date"]) { flex: 1 1 140px; }
.row > label:has(> input[type="time"]) { flex: 1 1 110px; }

.facts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-bottom: 16px;
  background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.facts > div { background: var(--surface); padding: 10px 12px; }
.facts strong { display: block; font-size: 1.15rem; font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums; }
.block-info { margin-bottom: 16px; }
.block-info p { margin: 3px 0 0; }
.sheet-body h3 { font-size: .95rem; font-weight: 650; margin: 4px 0 8px; }

.fp-card { border-top: 1px solid var(--line); padding: 10px 0; }
.fp-card:last-child { border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.fp-card .fp-line { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.fp-card .zug { font-weight: 700; }
.fp-card .time { color: var(--muted); font-weight: 500; }
.fp-route { margin-top: 2px; }
.fp-route .arrow { color: var(--muted); padding: 0 5px; }
.fp-note { margin-top: 2px; font-size: .85rem; color: var(--muted); }

.fp-head { display: flex; justify-content: space-between; align-items: center; margin: 6px 0 10px; }
.fp-row { border: 1px solid var(--line); border-radius: 12px; padding: 4px 12px 0; margin: 0 0 12px; }
.fp-row legend { display: flex; align-items: center; gap: 10px; padding: 0 6px; font-weight: 600; font-size: .88rem; }
.fp-row legend .link { padding: 4px; font-size: .8rem; color: var(--danger); }
/* Auswahlfeld wie Eingabefeld */
select {
  font: inherit; color: var(--text); width: 100%; min-height: 44px; margin-top: 5px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  font-size: 1rem; font-weight: 400;
}
select:focus { outline: none; border-color: var(--accent); }
.field-label { font-size: .8rem; color: var(--muted); font-weight: 600; }

/* mehrere Loks */
.lok-row { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.lok-row input { flex: 1; }
.lok-row .icon-btn { font-size: 1rem; flex: none; }
#f-loks { margin-bottom: 14px; }

/* Zwangsbremsung */
:root { --warn: #d97706; }
@media (prefers-color-scheme: dark) { :root { --warn: #f59e0b; } }
.w-icon svg { width: 18px; height: 18px; display: block; flex: none; }
.w-icon path { fill: none; stroke: var(--warn); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.tl-warn { display: flex; align-items: center; gap: 8px; color: var(--warn); font-size: .85rem; font-weight: 600; margin-top: 8px; }
.trip-warn { border-top: 1px solid var(--line); margin: 6px 0 4px; padding-top: 10px; }
#d-zb h3 { margin-top: 18px; }
.zb-card {
  border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--line)); border-radius: 12px;
  background: color-mix(in srgb, var(--warn) 7%, var(--surface)); padding: 12px 14px; margin-bottom: 8px;
}
.zb-top { display: flex; align-items: center; gap: 8px; }
.zb-top strong { flex: 1; }
.zb-zeit { font-weight: 700; font-variant-numeric: tabular-nums; }
.zb-line { margin: 4px 0 0 26px; color: var(--muted); font-size: .9rem; }
.zb-text { margin: 8px 0 0 26px; font-size: .92rem; }
.zb-row { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }

/* Autofahrt mit Betriebsstellen-Vorschlägen */
.fp-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ac-field { position: relative; }
.ac-list {
  position: absolute; left: 0; right: 0; top: calc(100% - 10px); z-index: 5;
  list-style: none; margin: 0; padding: 4px; max-height: 280px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.ac-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 9px 10px; border-radius: 7px; cursor: pointer;
}
.ac-list li:hover, .ac-list li.aktiv { background: var(--surface-2); }
.ac-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-code { font-size: .8rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ac-list li.ac-leer { color: var(--muted); cursor: default; }
input.ungueltig { border-color: var(--danger); }
.ac-field:has(input.ungueltig) label::after {
  content: "Bitte eine Betriebsstelle aus der Liste wählen"; display: block; margin-top: 4px;
  color: var(--danger); font-weight: 500;
}

/* Schicht-Formular: alle Felder untereinander */
#shift-form .row { flex-direction: column; gap: 0; }
#shift-form .row > label { flex: none; width: 100%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
