/* Fofana App – Farben im CI */
:root {
  --navy:#0B2A6E; --blau:#0B6FC0; --hell:#1C9BE3; --fl:#F0F6FC; --fl2:#E4F0FB; --linie:#E3E9F1;
  --text:#1A2433; --grau:#5E6B80; --rot:#C62828; --rotfl:#FDECEC; --gruen:#1B7F3B; --gruenfl:#E7F5EC; --gelb:#B26A00; --gelbfl:#FFF4E0;
  --nav-h:64px;
}
* { box-sizing:border-box; margin:0; padding:0; }
html { -webkit-text-size-adjust:100%; }
body { font-family:system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color:var(--text); background:#fff; font-size:16px; line-height:1.4;
  padding-bottom:calc(var(--nav-h) + 90px + env(safe-area-inset-bottom)); }
button { font:inherit; cursor:pointer; }
a { color:var(--blau); }
code { background:var(--fl2); padding:1px 5px; border-radius:4px; font-size:.9em; }
.versteckt { display:none !important; }

/* Kopf */
.kopf { background:#fff; padding:calc(10px + env(safe-area-inset-top)) 16px 10px; display:flex; align-items:center; gap:12px; position:sticky; top:0; z-index:10; border-bottom:1px solid var(--linie); }
.kopf-logo { width:42px; height:42px; }
.kopf-text { flex:1; min-width:0; }
.eyebrow { font-size:11px; letter-spacing:.16em; text-transform:uppercase; color:var(--hell); font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.kopf h1 { font-size:19px; color:var(--navy); font-weight:700; }
.kopf-knopf { width:40px; height:40px; border-radius:10px; border:1px solid var(--linie); background:#fff; color:var(--navy); font-size:20px; }
.balken { height:3px; background:linear-gradient(90deg,var(--navy),var(--hell)); }
.offline { background:var(--gelbfl); color:var(--gelb); font-size:13px; font-weight:600; text-align:center; padding:6px 12px; }

main { padding:16px; max-width:720px; margin:0 auto; }
h2 { color:var(--navy); font-size:20px; margin-bottom:8px; }
h3 { color:var(--navy); font-size:17px; }
.zwischen { margin:28px 0 8px; }
.gruss { font-size:24px; margin-bottom:2px; }
.hinweis { font-size:14px; color:var(--grau); margin-bottom:12px; }
.klein { font-size:13px; }
.mitte { text-align:center; margin-top:16px; }

.karte { background:var(--fl); border-radius:14px; padding:16px; margin-bottom:14px; }
label { display:block; font-size:12px; letter-spacing:.1em; text-transform:uppercase; color:var(--blau); font-weight:600; margin-bottom:6px; }
select, input[type=text], input[type=password], input[type=search], input[type=url], textarea {
  width:100%; font:inherit; padding:12px; border:1px solid #C9D6E6; border-radius:10px; background:#fff; color:var(--text); }
select:focus, input:focus, textarea:focus { outline:2px solid var(--hell); outline-offset:1px; border-color:var(--hell); }
.feld + .feld { margin-top:12px; }
.abstand { margin-top:16px; }

.knopf { display:block; width:100%; background:var(--navy); color:#fff; border:0; border-radius:12px; padding:15px; font-weight:600; font-size:17px; margin-bottom:10px; }
.knopf.zwei { background:#fff; color:var(--navy); border:1.5px solid var(--navy); }
.knopf.rot { background:#fff; color:var(--rot); border:1.5px solid var(--rot); }
.knopf.klein-knopf { padding:10px; font-size:15px; margin-top:12px; margin-bottom:0; }
.knopf:disabled { opacity:.45; cursor:default; }

/* Laden */
.laden { text-align:center; color:var(--grau); padding:60px 0; }
.kreisel { width:36px; height:36px; border-radius:50%; border:4px solid var(--fl2); border-top-color:var(--blau); margin:0 auto 14px; animation:dreh 0.9s linear infinite; }
@keyframes dreh { to { transform:rotate(360deg); } }

/* Meldung oben */
.meldung { position:fixed; left:16px; right:16px; top:calc(16px + env(safe-area-inset-top)); z-index:50; padding:14px 16px; border-radius:12px; color:#fff; font-weight:600; display:none; max-width:640px; margin:0 auto; box-shadow:0 10px 30px -10px rgba(11,42,110,.5); }
.meldung.ok { background:var(--gruen); } .meldung.fehler { background:var(--rot); }

/* Start */
.kacheln { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; margin:14px 0 18px; }
.kachel { background:var(--fl); border-radius:14px; padding:14px; text-align:left; border:0; color:var(--text); box-shadow:inset 3px 0 0 var(--hell); }
.kachel .wert { font-size:28px; font-weight:700; color:var(--navy); line-height:1.1; }
.kachel .was { font-size:13px; color:var(--grau); margin-top:2px; }
.kachel.warn { background:var(--rotfl); box-shadow:inset 3px 0 0 var(--rot); } .kachel.warn .wert { color:var(--rot); }
.kachel.gut { background:var(--gruenfl); box-shadow:inset 3px 0 0 var(--gruen); } .kachel.gut .wert { color:var(--gruen); }
.schnell { margin-bottom:8px; }

/* Listen */
.liste .zeile { display:block; width:100%; text-align:left; background:#fff; border:1px solid var(--linie); border-radius:12px; padding:12px 14px; margin-bottom:8px; color:var(--text); }
.zeile .oben { display:flex; justify-content:space-between; gap:8px; align-items:baseline; }
.zeile .titel { font-weight:600; }
.zeile .unter { font-size:13px; color:var(--grau); margin-top:2px; }
.zeile .text { font-size:14px; margin-top:6px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.marke { display:inline-block; font-size:12px; font-weight:700; border-radius:20px; padding:2px 10px; white-space:nowrap; }
.marke.Offen { background:var(--rotfl); color:var(--rot); }
.marke.In.Arbeit, .marke.inarbeit { background:var(--gelbfl); color:var(--gelb); }
.marke.Erledigt { background:var(--gruenfl); color:var(--gruen); }
.marke.problem { background:var(--rotfl); color:var(--rot); }

/* Lager */
.tabs, .filter { display:grid; grid-auto-flow:column; grid-auto-columns:1fr; background:var(--fl2); border-radius:12px; padding:4px; margin-bottom:14px; }
.tabs button, .filter button { border:0; background:none; padding:10px 4px; border-radius:9px; font-size:14px; font-weight:600; color:var(--navy); }
.tabs button.an, .filter button.an { background:var(--navy); color:#fff; }
.gruppe { font-size:13px; font-weight:700; color:var(--navy); background:var(--fl2); padding:8px 12px; border-radius:8px; margin:18px 0 4px; box-shadow:inset 3px 0 0 var(--hell); }
.artikel { display:flex; align-items:center; gap:10px; padding:10px 2px; border-bottom:1px solid var(--linie); }
.artikel .info { flex:1; min-width:0; }
.artikel .name { font-weight:600; font-size:15px; }
.artikel .bestand { font-size:12.5px; color:var(--grau); margin-top:2px; }
.artikel .bestand.niedrig { color:var(--rot); font-weight:600; }
.stepper { display:flex; align-items:center; gap:4px; }
.stepper button { width:42px; height:42px; border-radius:10px; border:1px solid #C9D6E6; background:#fff; font-size:22px; color:var(--navy); line-height:1; }
.stepper input { width:58px; text-align:center; padding:10px 4px; font:inherit; font-weight:600; border:1px solid #C9D6E6; border-radius:10px; }
.stepper input.voll { background:var(--fl2); border-color:var(--blau); color:var(--navy); }

/* Nachweis */
.schritt { display:flex; align-items:center; gap:10px; margin:22px 0 10px; }
.schritt .n { flex:0 0 28px; height:28px; border-radius:50%; background:var(--hell); color:#fff; font-weight:700; display:flex; align-items:center; justify-content:center; font-size:14px; }
.schritt h3 { flex:1; }
.schritt .neben { font-size:14px; color:var(--blau); background:none; border:0; font-weight:600; }
.leistung { display:flex; gap:12px; align-items:flex-start; padding:12px 2px; border-bottom:1px solid var(--linie); cursor:pointer; width:100%; background:none; border-left:0; border-right:0; border-top:0; text-align:left; color:var(--text); }
.leistung .box { flex:0 0 30px; height:30px; border-radius:8px; border:2px solid #C9D6E6; background:#fff; display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700; font-size:18px; }
.leistung.an .box { background:var(--gruen); border-color:var(--gruen); }
.leistung .txt { flex:1; font-size:15px; line-height:1.35; padding-top:4px; }
.leistung .turnus { display:block; font-size:12px; color:var(--grau); margin-top:2px; }
.fotos { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.fotos.klein { grid-template-columns:repeat(4,1fr); margin:10px 0 14px; }
.foto { position:relative; aspect-ratio:1; border-radius:10px; overflow:hidden; background:var(--fl2); }
.foto img { width:100%; height:100%; object-fit:cover; display:block; }
.foto .st { position:absolute; left:0; right:0; bottom:0; background:rgba(11,42,110,.75); color:#fff; font-size:11px; font-weight:600; text-align:center; padding:4px; border:0; }
.foto .st.fehler { background:var(--rot); }
.foto .weg { position:absolute; top:4px; right:4px; width:28px; height:28px; border-radius:50%; border:0; background:rgba(0,0,0,.55); color:#fff; font-size:18px; line-height:1; }
.fotoknopf { aspect-ratio:1; border-radius:10px; border:2px dashed var(--hell); background:var(--fl); color:var(--blau); font-weight:600; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.fotoknopf b { font-size:30px; line-height:1; }
.check { display:flex; gap:10px; align-items:center; text-transform:none; letter-spacing:0; font-size:15px; color:var(--text); font-weight:500; margin-top:14px; }
.check input { width:22px; height:22px; }
.fertig { text-align:center; padding:28px 18px; }
.haken { width:64px; height:64px; border-radius:50%; background:var(--gruen); color:#fff; font-size:34px; display:flex; align-items:center; justify-content:center; margin:0 auto 12px; }

/* Untere Leisten */
.aktion { position:fixed; left:0; right:0; bottom:calc(var(--nav-h) + env(safe-area-inset-bottom)); background:#fff; border-top:1px solid var(--linie); padding:10px 16px; z-index:9; }
.aktion .innen { max-width:720px; margin:0 auto; }
.aktion .knopf { margin:0; }
.nav { position:fixed; left:0; right:0; bottom:0; height:calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom:env(safe-area-inset-bottom); background:var(--navy); display:flex; z-index:10; }
.nav button { flex:1; border:0; background:none; color:rgba(255,255,255,.7); font-size:12px; font-weight:600; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; position:relative; }
.nav button .sym { font-size:20px; line-height:1; }
.nav button.an { color:#fff; box-shadow:inset 0 3px 0 var(--hell); }
.nav .zahl { position:absolute; top:6px; left:calc(50% + 8px); background:var(--rot); color:#fff; border-radius:10px; font-size:11px; padding:1px 6px; }

/* Dialoge */
.overlay { position:fixed; inset:0; background:rgba(11,42,110,.55); z-index:40; display:flex; align-items:flex-end; justify-content:center; padding:16px; }
.blatt { position:relative; background:#fff; border-radius:18px; padding:22px 20px; max-width:560px; width:100%; max-height:90vh; overflow:auto; }
.blatt .zu { position:absolute; top:10px; right:12px; width:36px; height:36px; border:0; background:var(--fl); border-radius:50%; font-size:22px; color:var(--navy); }
.blatt h2 { padding-right:40px; }
.rek-text { white-space:pre-wrap; background:var(--fl); border-radius:10px; padding:12px; margin:8px 0 4px; font-size:15px; }
.filter.status button[data-s="Offen"].an { background:var(--rot); }
.filter.status button[data-s="In Arbeit"].an { background:var(--gelb); }
.filter.status button[data-s="Erledigt"].an { background:var(--gruen); }
.schritte { padding-left:22px; margin:6px 0 16px; } .schritte li { padding:6px 0; }

@media (min-width:900px) {
  .overlay { align-items:center; }
}
