:root {
  --navy: #14213d; --navy-2: #22335c; --akzent: #e07a1f; --akzent-dunkel: #b85f10;
  --bg: #f3f4f6; --karte: #fff; --text: #1b1f27; --grau: #6b7280; --linie: #e2e5ea;
  --ok: #157f3b; --ok-bg: #e5f5ea; --fehler: #b42318; --fehler-bg: #fdecea;
  --hoch: #b45309; --notfall: #b42318; --feiertag: #fff4d6; --abwesend: #eef0f4;
  --radius: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.45; }
a { color: var(--navy-2); }
h1 { font-size: 1.45rem; margin: 0 0 .9rem; }
h2 { font-size: 1.1rem; margin: 1.6rem 0 .6rem; }
main { max-width: 1100px; margin: 0 auto; padding: 1rem 1rem 6rem; }
main.schmal { max-width: 440px; padding-top: 3rem; }

/* Kopf */
.top { background: var(--navy); color: #fff; display: flex; align-items: center; gap: 1.5rem;
       padding: .6rem 1rem; padding-top: calc(.6rem + env(safe-area-inset-top)); position: sticky; top: 0; z-index: 10; }
.logo { color: #fff; font-weight: 800; letter-spacing: .08em; text-decoration: none; font-size: 1.15rem; }
.haupt { display: flex; gap: .25rem; flex: 1; }
.haupt a { color: #cdd5e6; text-decoration: none; padding: .4rem .7rem; border-radius: 6px; }
.haupt a.akt, .haupt a:hover { background: var(--navy-2); color: #fff; }
.konto { position: relative; }
.konto summary { cursor: pointer; list-style: none; color: #cdd5e6; }
.konto summary::after { content: " ▾"; }
.konto .menue { position: absolute; right: 0; top: 2rem; background: #fff; border-radius: var(--radius);
                box-shadow: 0 8px 24px rgba(0,0,0,.18); padding: .4rem; min-width: 180px; }
.konto .menue a, .konto .menue .link { display: block; padding: .55rem .7rem; color: var(--text);
                text-decoration: none; width: 100%; text-align: left; }
.link { background: none; border: 0; font: inherit; cursor: pointer; }

/* Navigation unten (Handy) */
.unten { display: none; }
@media (max-width: 760px) {
  .haupt { display: none; }
  .top { justify-content: space-between; }
  .unten { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: #fff;
           border-top: 1px solid var(--linie); padding: .3rem .2rem calc(.3rem + env(safe-area-inset-bottom)); z-index: 10; }
  .unten a { flex: 1; text-align: center; color: var(--grau); text-decoration: none; font-size: .72rem; }
  .unten a span { display: block; font-size: 1.3rem; line-height: 1.4; }
  .unten a.akt { color: var(--navy); font-weight: 600; }
  .unten a.foto span { background: var(--akzent); color: #fff; border-radius: 50%; width: 2.6rem; height: 2.6rem;
                       line-height: 2.6rem; margin: -1.1rem auto .1rem; box-shadow: 0 4px 12px rgba(224,122,31,.45); }
}

/* Bausteine */
.karte { background: var(--karte); border-radius: var(--radius); padding: 1rem; border: 1px solid var(--linie); }
.karte + .karte { margin-top: .8rem; }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.zeile { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.zeile.zwischen { justify-content: space-between; }
.leise { color: var(--grau); font-size: .9rem; }
.flash { padding: .75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; background: var(--ok-bg); color: var(--ok); }
.flash.fehler { background: var(--fehler-bg); color: var(--fehler); }

.btn { display: inline-block; background: var(--navy); color: #fff; border: 0; border-radius: 8px;
       padding: .65rem 1.1rem; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--navy-2); }
.btn.akzent { background: var(--akzent); }
.btn.akzent:hover { background: var(--akzent-dunkel); }
.btn.hell { background: #fff; color: var(--navy); border: 1px solid var(--linie); }
.btn.gross { width: 100%; padding: .95rem; font-size: 1.05rem; }
.btn.klein { padding: .35rem .7rem; font-size: .85rem; }

/* Formulare */
label { display: block; font-weight: 600; font-size: .9rem; margin: .8rem 0 .3rem; }
input, select, textarea { width: 100%; padding: .65rem .7rem; border: 1px solid #cfd4dc; border-radius: 8px;
       font: inherit; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--akzent); border-color: transparent; }
textarea { min-height: 90px; }
.felder { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 .9rem; }
.hinweis { font-size: .82rem; color: var(--grau); margin-top: .25rem; }
.checkbox { display: flex; gap: .5rem; align-items: center; font-weight: 400; }
.checkbox input { width: auto; }

/* Listen */
.liste { list-style: none; margin: 0; padding: 0; }
.liste li { border-bottom: 1px solid var(--linie); }
.liste li:last-child { border-bottom: 0; }
.liste a.eintrag { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem .2rem;
                   text-decoration: none; color: inherit; }
.liste a.eintrag:hover { background: #f8f9fb; }
.titel { font-weight: 600; }
.leer { color: var(--grau); padding: .6rem 0; }

.marke { display: inline-block; font-size: .75rem; font-weight: 700; padding: .12rem .5rem; border-radius: 99px;
         background: #e8ebf1; color: var(--navy-2); white-space: nowrap; }
.marke.neu { background: #e0ecff; color: #1d4ed8; }
.marke.geplant { background: #ece7ff; color: #5b21b6; }
.marke.in_arbeit { background: #fff1db; color: var(--hoch); }
.marke.erledigt { background: var(--ok-bg); color: var(--ok); }
.marke.hoch { background: #fff1db; color: var(--hoch); }
.marke.notfall { background: var(--fehler-bg); color: var(--notfall); }

table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
th { font-size: .8rem; color: var(--grau); text-transform: uppercase; letter-spacing: .03em; }
.tabelle { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--linie); }

/* Kalender */
.kal { min-width: 820px; table-layout: fixed; }
.kal th:first-child, .kal td:first-child { width: 130px; }
.kal td { height: 88px; font-size: .85rem; }
.kal td.feiertag { background: var(--feiertag); }
.kal td.abwesend { background: var(--abwesend); }
.kal td.we { background: #fafafa; }
.kal th.heute { color: var(--akzent); }
.termin { display: block; background: #eef2fb; border-left: 3px solid var(--navy-2); border-radius: 4px;
          padding: .2rem .35rem; margin-bottom: .25rem; text-decoration: none; color: var(--text); }
.termin.hoch { border-left-color: var(--hoch); }
.termin.notfall { border-left-color: var(--notfall); background: var(--fehler-bg); }
.termin.erledigt { opacity: .55; }
.kal .info { font-size: .75rem; color: var(--grau); font-style: italic; }

.foto-feld { border: 2px dashed #c3c9d4; border-radius: var(--radius); padding: 1.4rem; text-align: center;
             background: #fafbfc; cursor: pointer; display: block; font-weight: 400; }
.foto-feld input { display: none; }
.foto-feld img { max-width: 100%; max-height: 260px; border-radius: 8px; margin-top: .6rem; }
.unterwegs { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0 .2rem; }
.unterwegs .btn { flex: 1 1 200px; text-align: center; padding: .9rem; font-size: 1.05rem; }
.navi-wahl { display: grid; gap: .7rem; }
.einsatz { border-bottom: 1px solid var(--linie); padding-bottom: .6rem; margin-bottom: .6rem; }
.summe { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .8rem; margin-top: 1rem; }
.summe div { display: flex; flex-direction: column; }
.summe strong { font-size: 1.25rem; }
.konto-balken { height: .6rem; background: #e8ebf1; border-radius: 99px; overflow: hidden; margin: .5rem 0 .3rem; }
.konto-balken div { height: 100%; background: var(--ok); }
.konto-balken div.knapp { background: var(--hoch); }
.konto-balken div.leer { background: var(--fehler); }
.karte.naechster { border-left: 4px solid var(--akzent); }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0; }
.dl dt { color: var(--grau); }
.dl dd { margin: 0; }
