/* Disposition (Web-App für das Büro) */
body.app { min-height: 100vh; }
.rahmen { display: flex; min-height: 100vh; }
.seitenleiste {
  width: 248px; flex: none; background: var(--asphalt) linear-gradient(180deg, rgba(242, 169, 0, .06), transparent 180px); border-right: 1px solid #1B2633; color: var(--on-ink); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 12px;
}
.marke { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 800; font-size: 18px; }
.marke:hover { color: inherit; }
.seitenleiste .marke { padding: 4px 10px 18px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px;
  color: #D3D9E2; text-decoration: none; font-weight: 600; font-size: 15px;
}
.nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav a { position: relative; transition: background .15s, color .15s; }
.nav a.aktiv { background: rgba(255, 255, 255, .08); color: #fff; }
.nav a.aktiv::before { content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--amber); box-shadow: 0 0 12px rgba(242, 169, 0, .7); }
.nav a.aktiv svg { color: var(--amber); }
.nav .zahl { margin-left: auto; font-size: 12px; background: var(--amber); color: var(--ink); border-radius: 99px; padding: 1px 8px; font-weight: 800; }
.nav-trenner { height: 1px; background: rgba(255, 255, 255, .1); margin: 10px 8px; }
.leiste-fuss { margin-top: auto; padding: 12px 10px 4px; font-size: 13px; color: var(--on-ink-muted); display: flex; flex-direction: column; gap: 8px; }
.leiste-fuss b { color: var(--on-ink); }
.leiste-fuss button { background: none; border: 0; color: var(--on-ink-muted); padding: 6px 0; text-align: left; cursor: pointer; display: flex; gap: 8px; align-items: center; min-height: 36px; }
.leiste-fuss button:hover { color: #fff; }
.leiste-fuss button[data-act="ton"][aria-pressed="true"] { color: var(--amber); }

.hauptbereich { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }
.kopf-mobil { display: none; }
.inhalt { width: 100%; max-width: 1240px; margin: 0 auto; padding: 28px 28px 64px; display: flex; flex-direction: column; gap: 22px; }
.titelzeile { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; }
.titelzeile .links { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.titelzeile .aktionen { display: flex; flex-wrap: wrap; gap: 8px; }
.zurueck { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; min-height: 32px; }

.banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; }
.banner.info { background: var(--blue-soft); color: var(--blue); }
.banner.warn { background: var(--warn-bg); color: var(--amber-deep); }
.banner.rot { background: var(--red-soft); color: #8A2A1E; }
.banner .knopf { margin-left: auto; }

/* Kennzahlen */
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.kachel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kachel .t { font-size: 13px; color: var(--muted); font-weight: 600; }
.kachel .w { font-family: var(--mono); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kachel .u { font-size: 12px; color: var(--muted); }
.kachel.dunkel { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.kachel.dunkel .t, .kachel.dunkel .u { color: var(--on-ink-muted); }
.kachel.dunkel .w { color: var(--amber); }
.kachel.dunkel { background: var(--asphalt); border-color: #1B2633; }
.kachel-led { padding: 8px 10px; margin: 2px 0; }
.kachel a { font-size: 13px; font-weight: 700; color: inherit; }

.spalten { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.spalten > .gross { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.spalten > .neben { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.block-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.block-kopf h2 { font-size: 17px; }
.leer { color: var(--muted); font-size: 14px; padding: 6px 0; }
.leer-gross { text-align: center; padding: 32px 16px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.leer-gross svg { color: var(--field); }

/* Live an der Rampe */
.live { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.live-karte { background: var(--asphalt-2); color: var(--on-ink); border: 1px solid #1E2A37; border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; position: relative; overflow: hidden; transition: border-color .3s, box-shadow .3s, transform .15s; }
.live-karte::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--led-gelb); box-shadow: 0 0 16px var(--led-gelb); }
.live-karte.ueber { border-color: rgba(255, 74, 58, .45); box-shadow: 0 0 0 1px rgba(255, 74, 58, .15), 0 10px 40px rgba(255, 74, 58, .12); }
.live-karte.ueber::before { background: var(--led-rot); box-shadow: 0 0 16px var(--led-rot); animation: puls 1.6s ease-in-out infinite; }
.live-karte:hover { color: var(--on-ink); box-shadow: var(--shadow-l); transform: translateY(-2px); }
.live-karte .led { padding: 12px 14px; }
.live-karte [data-geld] { color: #fff; font-weight: 700; }
.live-karte.ueber [data-geld] { color: var(--led-rot); }
.live-karte .uhr { font-family: var(--mono); font-size: 34px; font-weight: 700; color: var(--amber); line-height: 1; font-variant-numeric: tabular-nums; }
.live-karte .uhr.ueber { color: var(--coral); }
.live-karte .zeile { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--on-ink-muted); }
.balken { height: 8px; border-radius: 99px; background: var(--ink-2); overflow: hidden; }
.balken > i { display: block; height: 100%; border-radius: 99px; background: var(--amber); }
.balken.hell { background: var(--line-2); }
.balken.hell > i { background: var(--ink); }
.puls { width: 9px; height: 9px; border-radius: 99px; background: var(--amber); display: inline-block; animation: puls 1.4s ease-in-out infinite; }
@keyframes puls { 0%, 100% { opacity: 1 } 50% { opacity: .3 } }

/* Listen */
.liste { display: flex; flex-direction: column; }
.liste > .eintrag { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line-2); text-decoration: none; color: inherit; min-width: 0; }
.liste > .eintrag:last-child { border-bottom: 0; }
a.eintrag:hover { background: var(--soft); }
.eintrag .haupttext { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.eintrag .haupttext b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eintrag .haupttext span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eintrag .wert { font-family: var(--mono); font-weight: 700; white-space: nowrap; text-align: right; }

.balkenliste { display: flex; flex-direction: column; gap: 12px; }
.balkenliste .z { display: flex; flex-direction: column; gap: 6px; }
.balkenliste .z > div:first-child { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.balkenliste .z b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Tour */
.tag-wahl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tag-wahl input { width: auto; min-height: 44px; }
.fahrer-gruppe { display: flex; flex-direction: column; gap: 10px; }
.fahrer-gruppe > h3 { display: flex; align-items: center; gap: 8px; }
.stopps { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.stopp { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.stopp.aktiv { border: 2px solid var(--amber); }
.stopp.erledigt { background: var(--soft); }
.stopp .oben { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.stopp .fenster { font-family: var(--mono); font-weight: 700; }
.stopp .knoepfe { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }

/* Filter */
.filter, .filter.block { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-items: end; }
.filter label { font-size: 13px; min-width: 0; }
.filter label.suche { grid-column: span 2; }
.zeitfenster .bis { display: inline; }
@media (max-width: 640px) { .zeitfenster { width: 56px !important; } .zeitfenster .bis { display: none; } }
.filter input, .filter select { min-height: 44px; }

/* Nachweis-Detail */
.verlauf-app { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.verlauf-app li { display: grid; grid-template-columns: 82px 18px minmax(0, 1fr); gap: 10px; padding: 8px 0; position: relative; }
.verlauf-app li .z { font-family: var(--mono); font-weight: 700; font-size: 14px; padding-top: 1px; }
.verlauf-app li .p { position: relative; }
.verlauf-app li .p::before { content: ''; position: absolute; left: 50%; top: 5px; width: 10px; height: 10px; margin-left: -5px; border-radius: 99px; background: var(--line); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.verlauf-app li .p::after { content: ''; position: absolute; left: 50%; top: 18px; bottom: -14px; width: 2px; margin-left: -1px; background: var(--line-2); }
.verlauf-app li:last-child .p::after { display: none; }
.verlauf-app li.stark .p::before { background: var(--ink); }
.verlauf-app li.mark .p::before { background: var(--amber); }
.verlauf-app li small { display: block; color: var(--muted); font-size: 12px; }
.verlauf-app li.mark .t { color: var(--amber-deep); font-weight: 700; }
.fotoraster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.fotoraster a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; font-size: 12px; color: var(--muted); }
.fotoraster img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--line-2); }
.rechnung-box { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.rechnung-box > div { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.rechnung-box > div:last-child { border-bottom: 0; background: var(--ink); color: var(--on-ink); font-weight: 700; }
.rechnung-box > div:last-child .mono { color: var(--amber); font-size: 17px; }
.unterschriften { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.unterschriften figure { margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.unterschriften img { width: 100%; max-height: 90px; object-fit: contain; object-position: left; border-bottom: 1px solid var(--ink); background: #fff; }
.echtheit { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; }
.echtheit.ok { background: var(--green-soft); color: #1F6B44; }
.echtheit.nein { background: var(--red-soft); color: #8A2A1E; }

/* Forderungen */
.gruppe { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.gruppe-kopf { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--soft); }
.gruppe-kopf b { font-size: 16px; }
.gruppe .tabelle td:first-child, .gruppe .tabelle th:first-child { width: 44px; text-align: center; }
.gruppe .tabelle input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--ink); }

/* Statistik */
.diagramm { width: 100%; height: auto; display: block; }
.diagramm text { font-family: var(--font); font-size: 11px; fill: var(--muted); }
.diagramm .wert { font-family: var(--mono); font-size: 10px; fill: var(--ink); font-weight: 700; }
.erkenntnis { background: var(--amber-soft); color: #4D3400; padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; }

/* Reiter */
.reiter { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.reiter a { padding: 10px 14px; min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.reiter a.aktiv { color: var(--ink); border-bottom-color: var(--amber); }

/* Pakete */
.pakete { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.paket { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.paket.aktuell { border: 2px solid var(--amber); }
.paket .preis { font-family: var(--mono); font-size: 30px; font-weight: 700; }
.paket .preis small { font-family: var(--font); font-size: 13px; color: var(--muted); font-weight: 500; }
.paket ul { margin: 0; padding: 0 0 0 18px; color: var(--muted); font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.paket .knopf { margin-top: auto; }

/* QR */
.qr-box { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.qr-box .qr { background: #fff; padding: 8px; border-radius: 12px; border: 1px solid var(--line); }
.qr-box .code { font-family: var(--mono); font-size: 20px; font-weight: 700; letter-spacing: .06em; }

/* Anmeldung */
.anmeldung { min-height: 100vh; display: flex; align-items: stretch; }
.anmeldung .bild { flex: 1 1 420px; background: radial-gradient(120% 80% at 70% 0%, #1A2430 0%, var(--asphalt) 60%); position: relative; overflow: hidden; color: var(--on-ink); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.anmeldung .bild h1 { font-size: clamp(32px, 3.4vw, 50px); max-width: 15ch; font-stretch: 120%; line-height: .98; }
.anmeldung .bild h1 em { font-style: normal; color: var(--amber); }
.anmeldung .bild p { color: var(--on-ink-muted); max-width: 42ch; font-size: 17px; }
.anmeldung .feld-seite { flex: 1 1 460px; display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.anmeldung .feld-seite > div { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px; }
.anmeldung .wechsel { font-size: 14px; color: var(--muted); }
.vorteile { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.vorteile li { display: flex; gap: 10px; align-items: flex-start; color: var(--on-ink); }
.vorteile li svg { color: var(--amber); flex: none; margin-top: 2px; }

/* Dialoge, Meldungen */
body.dlg-offen { overflow: hidden; }
.dlg-hinter { position: fixed; inset: 0; background: rgba(14, 26, 43, .55); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; animation: einblenden .15s ease-out; }
.dlg { background: var(--surface); border-radius: 18px; width: 100%; max-width: 520px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: var(--shadow-l); }
.dlg.breit { max-width: 760px; }
.dlg-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 8px; }
.dlg-kopf h2 { font-size: 20px; }
.dlg-inhalt { padding: 8px 20px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.dlg-fuss { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px 18px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
@keyframes einblenden { from { opacity: 0 } to { opacity: 1 } }
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: calc(100% - 32px); max-width: 480px; }
.toast { background: var(--ink); color: var(--on-ink); padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 15px; box-shadow: var(--shadow-l); transition: opacity .3s, transform .3s; }
.toast.fehler { background: var(--red); color: #fff; }
.toast.ok { background: var(--green); color: #fff; }
.toast.weg { opacity: 0; transform: translateY(8px); }
.laden { display: flex; align-items: center; justify-content: center; padding: 48px; color: var(--muted); gap: 10px; }
.laden::before { content: ''; width: 18px; height: 18px; border-radius: 99px; border: 3px solid var(--line); border-top-color: var(--ink); animation: drehen .8s linear infinite; }
@keyframes drehen { to { transform: rotate(360deg) } }

/* Handy */
/* Anmeldung: Rampe mit Anzeigetafel */
.auth-buehne { position: relative; max-width: 440px; padding: 34px 0 6px; }
.auth-lampe { position: absolute; left: 50%; top: -48px; width: 72px; height: 10px; margin-left: -36px; border-radius: 0 0 8px 8px; background: #2A3542; }
.auth-lampe::after { content: ''; position: absolute; left: 50%; top: 10px; width: 420px; height: 300px; margin-left: -210px;
  background: radial-gradient(60% 100% at 50% 0%, rgba(255, 200, 69, .16), transparent 70%); clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%); pointer-events: none; }
.auth-tafel { background: #05080C; border: 6px solid #2A3542; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); position: relative; }
.auth-tafel::before, .auth-tafel::after { content: ''; position: absolute; top: -1px; width: 5px; height: 5px; border-radius: 99px; background: #4A5562; }
.auth-tafel::before { left: -1px; } .auth-tafel::after { right: -1px; }
.auth-tafel .led { border: 0; box-shadow: none; padding: 4px 6px; background: transparent; transition: none; }
.auth-tafel .led-gross { padding: 6px 18px; }
.auth-ampel { position: absolute; right: -54px; top: 46px; width: 36px; padding: 6px; background: #1A2430; border-radius: 10px; display: flex; flex-direction: column; gap: 6px; }
.auth-ampel i { display: block; width: 24px; height: 24px; border-radius: 99px; background: #2A1714; transition: background .3s, box-shadow .3s; }
.auth-ampel i.gruen { background: #11261A; }
.auth-ampel i.rot.an { background: var(--led-rot); box-shadow: 0 0 18px var(--led-rot); }
.auth-ampel i.gruen.an { background: var(--led-gruen); box-shadow: 0 0 18px var(--led-gruen); }
@media (max-width: 1180px) { .auth-ampel { display: none; } }

@media (max-width: 960px) {
  .seitenleiste { position: fixed; left: 0; top: 0; z-index: 90; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-l); }
  body.menue-offen .seitenleiste { transform: none; }
  body.menue-offen::after { content: ''; position: fixed; inset: 0; background: rgba(14, 26, 43, .5); z-index: 80; }
  .kopf-mobil { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--asphalt); color: var(--on-ink); padding: 10px 12px; position: sticky; top: 0; z-index: 50; }
  .kopf-mobil button { background: none; border: 0; color: inherit; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
  .inhalt { padding: 18px 16px 56px; gap: 18px; }
  h1 { font-size: 24px; }
  .anmeldung { flex-direction: column; }
  .anmeldung .bild { padding: 28px 20px; flex: none; }
  .anmeldung .bild h1 { font-size: 28px; }
  .anmeldung .bild .vorteile, .anmeldung .bild .bild-fuss { display: none; }
  .auth-buehne { max-width: 320px; padding-top: 18px; }
  .auth-lampe { display: none; }
}
@media (max-width: 640px) {
  .dlg-hinter { align-items: flex-end; padding: 0; }
  .dlg { border-radius: 18px 18px 0 0; max-height: 92vh; }
  .dlg-fuss .knopf { flex: 1 1 0; }
  .titelzeile .aktionen { width: 100%; }
  .titelzeile .aktionen .knopf { flex: 1 1 auto; }
  .karten-statt-tabelle thead { display: none; }
  .karten-statt-tabelle, .karten-statt-tabelle tbody, .karten-statt-tabelle tr, .karten-statt-tabelle td { display: block; width: 100%; }
  .karten-statt-tabelle tr { border-bottom: 1px solid var(--line); padding: 10px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; }
  .karten-statt-tabelle td { border: 0; padding: 0; }
  .karten-statt-tabelle td.k-ausblenden { display: none; }
  .karten-statt-tabelle td.k-rechts { text-align: right; grid-column: 2; }
  .karten-statt-tabelle td.k-voll { grid-column: 1 / -1; }
  .kachel .w { font-size: 22px; }
}
@media print {
  .seitenleiste, .kopf-mobil, .titelzeile .aktionen, .toasts { display: none !important; }
  .inhalt { padding: 0; }
}

/* Leitstand: „Jetzt an der Rampe“ als dunkles Pult */
.block.leitstand { background: var(--asphalt) linear-gradient(180deg, rgba(255, 176, 0, .05), transparent 140px); border-color: #1B2633; color: var(--on-ink); }
.block.leitstand .leise { color: var(--on-ink-muted); }
.block.leitstand .leer { color: var(--on-ink-muted); }
.block.leitstand .live-karte { background: #0E1620; }
.block.leitstand h2 { font-stretch: 112%; }
