/* Anmi-App – Farben wie alle Anmi-Programme (Anmi Scan / Dispo). */
:root {
  --akzent: #079FA5;
  --akzent-dunkel: #078E93;
  --akzent-hell: #E7F8F8;
  --text: #172033;
  --text-leise: #5B6779;
  --grund: #F5F8FA;
  --flaeche: #FFFFFF;
  --rand: #E3E9EF;
  --warn: #B7791F;
  --warn-hell: #FFF6E5;
  --rot: #C53030;
  --gruen: #1E8E3E;
  --radius: 14px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--grund);
  -webkit-tap-highlight-color: transparent;
  padding-bottom: env(safe-area-inset-bottom);
}
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }

/* Kopf */
.kopf {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: var(--flaeche);
  border-bottom: 1px solid var(--rand);
}
.kopf-logo { width: 34px; height: 34px; }
.kopf-text { display: flex; flex-direction: column; line-height: 1.15; flex: 1; min-width: 0; }
.kopf-marke { font-weight: 700; font-size: 19px; letter-spacing: .2px; }
.kopf-name { color: var(--text-leise); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kopf-knopf {
  border: 0; background: none; width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center; color: var(--text-leise);
}

.inhalt { max-width: 560px; margin: 0 auto; padding: 18px 16px 120px; }

h1 { font-size: 24px; line-height: 1.2; margin: 6px 0 14px; }
h2 { font-size: 17px; margin: 28px 0 10px; color: var(--text-leise); font-weight: 600; }
p { margin: 0 0 12px; }
.leise { color: var(--text-leise); }

/* Station: der wichtigste Teil der App */
.station {
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}
.station.jetzt { border-color: var(--akzent); box-shadow: 0 0 0 2px var(--akzent) inset; }
.station-jetzt {
  display: inline-block; margin-bottom: 8px; padding: 3px 10px; border-radius: 999px;
  background: var(--akzent); color: #fff; font-size: 14px; font-weight: 600;
}
.station-firma { font-size: 21px; font-weight: 700; line-height: 1.2; }
.station-ort { font-size: 17px; margin-top: 2px; }
.station-tag { color: var(--text-leise); font-size: 15px; margin-top: 2px; }

.knopf {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 56px; margin-top: 12px; padding: 12px 16px;
  border-radius: 12px; border: 1px solid var(--rand); background: var(--flaeche);
  font-weight: 600; font-size: 17px; cursor: pointer;
}
.knopf:active { transform: scale(.99); }
.knopf.haupt {
  min-height: 68px; font-size: 19px; border: 0;
  background: var(--akzent); color: #fff;
}
.knopf.haupt:active { background: var(--akzent-dunkel); }
.knopf.abgestellt { border: 2px solid var(--akzent); color: var(--akzent-dunkel); background: var(--akzent-hell); }
.knopf.leise { min-height: 48px; color: var(--text-leise); font-weight: 500; }
.knopf[disabled] { opacity: .5; }
.knopf svg { flex: none; }

/* Gesendet */
.gesendet { list-style: none; margin: 0; padding: 0; }
.gesendet li {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--rand);
}
.gesendet .was { min-width: 0; }
.gesendet .was b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stand { flex: none; font-size: 14px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--grund); }
.stand.ok { color: var(--gruen); background: #E8F5EC; }
.stand.nochmal { color: var(--rot); background: #FDECEC; }
.stand.wartet { color: var(--warn); background: var(--warn-hell); }
.grund-text { color: var(--rot); font-size: 14px; }

/* Leere Liste */
.leer { text-align: center; padding: 42px 12px; color: var(--text-leise); }
.leer svg { color: var(--akzent); }

/* Fotos eines Belegs */
.seiten { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 8px 0 4px; }
.seite {
  position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden;
  background: #DDE4EA; border: 1px solid var(--rand);
}
.seite img { width: 100%; height: 100%; object-fit: cover; }
.seite-nr {
  position: absolute; left: 8px; bottom: 8px; background: rgba(23, 32, 51, .78); color: #fff;
  font-size: 14px; padding: 2px 8px; border-radius: 6px;
}
.seite-weg {
  position: absolute; right: 6px; top: 6px; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: rgba(23, 32, 51, .78); color: #fff; font-size: 22px; line-height: 1;
}
.seite-neu {
  aspect-ratio: 3 / 4; border-radius: 12px; border: 2px dashed var(--akzent);
  background: var(--akzent-hell); color: var(--akzent-dunkel); font-weight: 600;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}

.unten {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 4;
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--grund) 75%, rgba(245, 248, 250, 0));
}
.unten-innen { max-width: 560px; margin: 0 auto; }
.unten .knopf { margin-top: 8px; }

/* Auswahl (Sprache, Grund) */
.auswahl { display: grid; gap: 10px; }
.auswahl button {
  min-height: 56px; text-align: left; padding: 12px 16px; border-radius: 12px;
  border: 1px solid var(--rand); background: var(--flaeche); font-size: 18px;
}
.auswahl button[aria-pressed="true"] { border-color: var(--akzent); box-shadow: 0 0 0 2px var(--akzent) inset; font-weight: 600; }
textarea {
  width: 100%; min-height: 96px; padding: 12px; border-radius: 12px; border: 1px solid var(--rand);
  font: inherit; background: var(--flaeche); resize: vertical;
}
label { display: block; margin: 16px 0 6px; font-weight: 600; }

/* Hinweis / Dialog / Meldung */
.hinweis { background: var(--warn-hell); border: 1px solid #F3D19C; color: #6B4500; border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.dialog-grund {
  position: fixed; inset: 0; z-index: 10; background: rgba(23, 32, 51, .55);
  display: flex; align-items: flex-end; justify-content: center;
}
.dialog {
  width: 100%; max-width: 560px; background: var(--flaeche); border-radius: 18px 18px 0 0;
  padding: 20px 16px calc(16px + env(safe-area-inset-bottom));
}
.dialog p { font-size: 19px; font-weight: 600; }
.meldung {
  position: fixed; left: 16px; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 20;
  max-width: 528px; margin: 0 auto; padding: 14px 16px; border-radius: 12px;
  background: var(--text); color: #fff; font-weight: 500;
}

@media (prefers-reduced-motion: no-preference) {
  .dialog { animation: hoch .18s ease-out; }
  @keyframes hoch { from { transform: translateY(24px); opacity: .6; } }
}
