/* ============================================================
   Medimobil – Online-Fahrtbestellung
   Barrierearmes, kontrastreiches Layout für ältere Nutzer.
   Farben zentral hier anpassen, um sie an medimobil.de anzugleichen.
   ============================================================ */

:root {
  --blau:        #0B5CAD;
  --blau-dunkel: #08447F;
  --gruen:       #1E7D3C;
  --rot:         #B3261E;
  --bg:          #F5F7FA;
  --flaeche:     #FFFFFF;
  --text:        #1A202C;
  --text-leise:  #4A5568;
  --rahmen:      #CBD5E0;
  --radius:      10px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

/* ---------- Kopf ---------- */
.kopf {
  background: var(--blau);
  color: #fff;
}
.kopf__innen {
  max-width: 900px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.marke { text-decoration: none; color: #fff; display: flex; flex-direction: column; line-height: 1.1; }
.marke__wort   { font-size: 1.5rem; font-weight: 700; letter-spacing: .5px; }
.marke__zusatz { font-size: .8rem; opacity: .9; text-transform: uppercase; letter-spacing: 2px; }

.nav { display: flex; flex-wrap: wrap; gap: 8px; }
.nav a {
  color: #fff;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-weight: 600;
}
.nav a:hover { background: var(--blau-dunkel); }
.nav__abmelden { border: 1px solid rgba(255,255,255,.6); }

/* ---------- Inhalt ---------- */
.inhalt {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}
h1 { font-size: 1.8rem; margin: .2em 0 .6em; }
h2 { font-size: 1.3rem; margin: 1.4em 0 .5em; }
p  { margin: .6em 0; }
a  { color: var(--blau-dunkel); }

.karte {
  background: var(--flaeche);
  border: 1px solid var(--rahmen);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 22px;
}

.einleitung { color: var(--text-leise); max-width: 60ch; }

/* ---------- Formulare ---------- */
form { margin: 0; }
.feld { margin-bottom: 18px; }
.feld > label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}
.feld small { color: var(--text-leise); font-weight: 400; display: block; margin-top: 4px; }

input[type=text], input[type=email], input[type=password],
input[type=date], input[type=time], input[type=tel],
select, textarea {
  width: 100%;
  font: inherit;
  padding: 13px 14px;
  min-height: 52px;
  color: var(--text);
  background: #fff;
  border: 2px solid var(--rahmen);
  border-radius: var(--radius);
}
textarea { min-height: 100px; resize: vertical; }

input:focus, select:focus, textarea:focus, a:focus-visible, button:focus-visible, .knopf:focus-visible {
  outline: 3px solid var(--blau);
  outline-offset: 2px;
  border-color: var(--blau);
}

.zweispaltig {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.zweispaltig--3070 { grid-template-columns: 2fr 1fr; }

/* Auswahl per großen Kacheln (Transportart) */
.auswahl { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.auswahl input { position: absolute; opacity: 0; }
.auswahl label {
  display: block;
  border: 2px solid var(--rahmen);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  font-weight: 600;
}
.auswahl label small { display: block; font-weight: 400; color: var(--text-leise); margin-top: 4px; }
.auswahl input:checked + label { border-color: var(--blau); background: #EAF2FB; }
.auswahl input:focus-visible + label { outline: 3px solid var(--blau); outline-offset: 2px; }

/* Kontrollkästchen */
.kontrolle { display: flex; gap: 12px; align-items: flex-start; }
.kontrolle input[type=checkbox] { width: 26px; height: 26px; margin-top: 3px; flex: none; }

/* ---------- Knöpfe ---------- */
.knopf {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 14px 26px;
  min-height: 54px;
  color: #fff;
  background: var(--blau);
  border: 2px solid var(--blau);
  border-radius: var(--radius);
  text-decoration: none;
  text-align: center;
}
.knopf:hover { background: var(--blau-dunkel); border-color: var(--blau-dunkel); }
.knopf--voll  { width: 100%; }
.knopf--leise { background: #fff; color: var(--blau-dunkel); }
.knopf--leise:hover { background: #EAF2FB; }
.knopf--gefahr { background: var(--rot); border-color: var(--rot); }

/* ---------- Hinweise / Meldungen ---------- */
.hinweis {
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 18px;
  border: 2px solid;
}
.hinweis--ok     { background: #E9F6EE; border-color: var(--gruen); color: #14532d; }
.hinweis--fehler { background: #FDECEA; border-color: var(--rot);   color: #7f1d1d; }
.hinweis--info   { background: #EAF2FB; border-color: var(--blau);  color: #08447F; }
.hinweis ul { margin: 6px 0 0; padding-left: 20px; }

/* ---------- Fahrtenliste ---------- */
.fahrt {
  border: 1px solid var(--rahmen);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 14px;
  background: #fff;
}
.fahrt__kopf { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; align-items: center; }
.fahrt__wann { font-size: 1.15rem; font-weight: 700; }
.fahrt dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 12px 0 0; }
.fahrt dt { color: var(--text-leise); }
.fahrt dd { margin: 0; }

.merker {
  display: inline-block;
  font-size: .85rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.merker--neu           { background: #EAF2FB; color: #08447F; }
.merker--bestaetigt    { background: #E9F6EE; color: #14532d; }
.merker--durchgefuehrt { background: #EDE9FE; color: #4c1d95; }
.merker--storniert     { background: #F1F1F1; color: #555; }

/* ---------- Fuß ---------- */
.fuss { background: #EDF1F6; border-top: 1px solid var(--rahmen); margin-top: 30px; }
.fuss__innen { max-width: 720px; margin: 0 auto; padding: 22px 20px; color: var(--text-leise); font-size: .95rem; }
.fuss__innen p { margin: .3em 0; }
.fuss__klein { font-size: .85rem; }

.zeile-aktion { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.mittig { text-align: center; }
.abstand-oben { margin-top: 22px; }

/* ---------- Mobil ---------- */
@media (max-width: 560px) {
  body { font-size: 17px; }
  .inhalt { padding: 20px 16px 50px; }
  .zweispaltig, .zweispaltig--3070, .auswahl { grid-template-columns: 1fr; }
  .karte { padding: 18px; }
}

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

/* ---------- Ergänzungen Version 2 ---------- */

/* Auswahl-Kacheln mit 3 Spalten (Kontotyp, Verordnung ja/nein/unklar) */
.auswahl--3 { grid-template-columns: 1fr 1fr 1fr; }

/* Mehrfachauswahl (Merkzeichen) */
.mehrfach { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.kontrolle--inline { align-items: center; padding: 6px 0; }
.kontrolle--inline input[type=checkbox] { margin-top: 0; }

/* Zeile mit Titel links und Aktion rechts */
.zeile-titel { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.zeile-titel h2 { margin: 1.2em 0 .4em; }

/* Datei-Uploads */
input[type=file] {
  width: 100%;
  font: inherit;
  padding: 10px;
  border: 2px dashed var(--rahmen);
  border-radius: var(--radius);
  background: #fff;
}
input[type=file]:focus { outline: 3px solid var(--blau); outline-offset: 2px; }

/* Dokument-Verweise (Admin) */
.dok-liste { list-style: none; margin: 8px 0 0; padding: 0; }
.dok-liste li { padding: 8px 0; border-bottom: 1px solid var(--rahmen); }
.dok-liste li:last-child { border-bottom: 0; }

@media (max-width: 560px) {
  .auswahl--3, .mehrfach { grid-template-columns: 1fr; }
}

/* ============================================================
   Rechnungsmodul
   ============================================================ */

/* Fortschrittsbalken (Rechnungslauf) */
.fortschritt {
    background: #e6eef5;
    border-radius: 999px;
    height: 26px;
    overflow: hidden;
    margin: 6px 0 18px;
}
.fortschritt__balken {
    background: var(--blau, #1c6ea4);
    color: #fff;
    height: 100%;
    line-height: 26px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: width .3s ease;
    min-width: 2.5rem;
}

/* Kennzahlen (Rechnungslauf-Zusammenfassung) */
.kennzahlen {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 0 0 14px;
}
.kennzahlen > div {
    background: #f4f8fb;
    border: 1px solid #e0e9f1;
    border-radius: 10px;
    padding: 12px 14px;
}
.kennzahlen dt { font-size: 0.8rem; color: #5a6b78; margin: 0; }
.kennzahlen dd { font-size: 1.4rem; font-weight: 700; margin: 2px 0 0; color: #1f2d38; }

/* Girocode (EPC-QR) auf Kundenrechnungen */
.giro {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid #e0e9f1;
    border-radius: 12px;
    background: #f9fbfd;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: flex-start;
}
.giro__code {
    flex: 0 0 auto;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #e0e9f1;
    line-height: 0;
}
.giro__daten { flex: 1 1 220px; min-width: 220px; }
.giro__daten p { margin: 0 0 10px; font-size: 0.92rem; color: #44515c; }
.giro__daten dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; }
.giro__daten dt { font-weight: 600; color: #5a6b78; }
.giro__daten dd { margin: 0; word-break: break-all; }
