/* Jespira-Farben aus den Koffer-Layouts */
:root { --rot: #D92127; --rot-dunkel: #A3151B; --rot-hell: #FDECEC; --anthrazit: #1B2229; --text2: #33404B; --leise: #4F5A65; --grau: #E3E6EA; --grund: #F4F5F7; --weiss: #fff;
  --gelb: #7A4B00; --gelb-hell: #FFF3D6; --gruen: #0E5A2E; --gruen-hell: #DFF3E6; }
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.45 Inter, "Segoe UI", system-ui, sans-serif; background: var(--grund); color: var(--anthrazit); }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
button, input, select, textarea { font: inherit; color: inherit; }

.kopf { background: var(--anthrazit); color: #fff; padding: 0 24px; padding-top: env(safe-area-inset-top); min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; position: sticky; top: 0; z-index: 2; }
.marke { display: flex; align-items: center; gap: 12px; }
.marke b { display: block; font-size: 16px; line-height: 1.15; }
.marke small { display: block; font-size: 12px; color: #C9CFD6; }
.logo { width: 32px; height: 32px; border-radius: 8px; background: var(--rot); display: grid; place-items: center; }

main { max-width: 1120px; margin: 0 auto; padding: 32px 24px; display: flex; flex-direction: column; gap: 20px; }
.titelzeile { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.titelzeile h1 { font-size: 28px; font-weight: 800; }
.leise { margin: 4px 0 0; color: var(--leise); font-size: 15px; }

button { border: 0; border-radius: 10px; min-height: 44px; padding: 0 16px; font-weight: 600; font-size: 15px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.primaer { background: var(--rot); color: #fff; }
.primaer:hover { background: #C11B22; }
.zweit { background: var(--weiss); color: var(--anthrazit); border: 1px solid var(--grau); }
.dunkel { background: var(--anthrazit); color: #fff; }
.geist { background: transparent; color: #fff; border: 1px solid var(--leise); font-size: 14px; min-height: 40px; }
.textrot { background: transparent; color: var(--rot-dunkel); padding: 0 4px; }
.icon { background: var(--weiss); border: 1px solid var(--grau); width: 44px; padding: 0; }
button:disabled { opacity: .6; cursor: default; }
:focus-visible { outline: 3px solid var(--rot); outline-offset: 2px; }

input, select, textarea { width: 100%; border: 1px solid var(--grau); border-radius: 10px; padding: 0 12px; min-height: 46px; background: var(--weiss); font-size: 16px; font-weight: 400; }
textarea { padding: 10px 12px; resize: vertical; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--leise); }
.karte { background: var(--weiss); border: 1px solid var(--grau); border-radius: 14px; padding: 16px; }
#loginForm { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 380px; margin: 10vh auto 0; padding: 24px; }
.fehler { color: var(--rot-dunkel); margin: 0; min-height: 1em; font-size: 14px; }

.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.kachel { background: var(--weiss); border: 1px solid var(--grau); border-radius: 14px; padding: 18px 20px; flex-direction: column; align-items: flex-start; gap: 4px; color: var(--anthrazit); text-align: left; }
.kachel span { font-size: 13px; color: var(--leise); }
.kachel b { font-size: 36px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.kachel.warn { background: var(--rot-hell); border-color: #F5C2C4; }
.kachel.warn span, .kachel.warn b { color: var(--rot-dunkel); }
.kachel.aktiv { box-shadow: inset 0 0 0 2px var(--anthrazit); }

.suche { flex-direction: row; align-items: center; gap: 10px; background: var(--weiss); border: 1px solid var(--grau); border-radius: 12px; padding: 0 16px; min-height: 52px; }
.suche input { border: 0; min-height: 50px; padding: 0; outline: none; }
.suche:focus-within { outline: 3px solid var(--rot); outline-offset: 2px; }

#liste { display: flex; flex-direction: column; gap: 12px; }
.fall { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.thumbs { display: flex; gap: 6px; flex-shrink: 0; }
.thumbs img, .platzhalter { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; display: block; background: var(--grau); }
.platzhalter { display: grid; place-items: center; color: #5D6874; }
.inhalt { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.kopfzeile { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.kopfzeile h3 { font-size: 17px; font-weight: 700; }
.nr { font-size: 14px; font-weight: 600; color: var(--rot); }
.meta { font-size: 14px; color: var(--leise); }
.notiz { margin: 0; font-size: 14px; color: var(--text2); white-space: pre-wrap; }
.geraete { display: flex; flex-direction: column; align-items: flex-end; min-width: 96px; }
.geraete span { font-size: 12px; color: var(--leise); }
.geraete b { font-size: 18px; }
.knoepfe { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pill { width: auto; min-height: 36px; border: 0; border-radius: 999px; padding: 0 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.st-Offen { background: var(--grund); color: var(--text2); }
.st-Label-verschickt, .st-Wartet-auf-Rückmeldung { background: var(--gelb-hell); color: var(--gelb); }
.st-Storniert { background: var(--grau); color: var(--text2); }
.st-Paket-angekommen { background: var(--rot-hell); color: var(--rot-dunkel); }
.st-Erstattet, .st-Erledigt { background: var(--gruen-hell); color: var(--gruen); }
.leer { color: var(--leise); text-align: center; }

dialog { width: min(760px, 100vw - 16px); max-height: calc(100dvh - 16px); border: 0; border-radius: 16px; padding: 24px; background: var(--weiss); color: var(--anthrazit); }
dialog::backdrop { background: #1B2229aa; }
#fallForm { display: flex; flex-direction: column; gap: 16px; }
.dialogkopf { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.dialogkopf small { font-size: 13px; font-weight: 600; color: var(--rot); }
.dialogkopf h2 { font-size: 24px; font-weight: 800; }
.seg { border: 0; padding: 4px; margin: 0; background: var(--grund); border-radius: 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 4px; }
.seg legend { float: left; grid-column: 1 / -1; width: 100%; font-size: 13px; font-weight: 600; color: var(--leise); padding: 0 0 6px; }
.seg label { position: relative; min-height: 40px; border-radius: 9px; display: grid; place-items: center; font-size: 13px; color: var(--leise); cursor: pointer; text-align: center; padding: 0 6px; }
.seg input { position: absolute; opacity: 0; inset: 0; min-height: 0; cursor: pointer; }
.seg label:has(input:checked) { background: var(--anthrazit); color: #fff; }
.seg label:has(input:focus-visible) { outline: 3px solid var(--rot); outline-offset: 1px; }
.bildknoepfe { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.gross { min-height: 72px; border-radius: 12px; flex-direction: row; align-items: center; justify-content: center; gap: 10px; font-size: 15px; cursor: pointer; }
.gross.primaer { color: #fff; }
.gross.zweit { color: var(--anthrazit); background: var(--grund); }
.bilder { display: flex; gap: 10px; flex-wrap: wrap; }
.bilder:empty { display: none; }
.bilder figure { margin: 0; display: flex; flex-direction: column; gap: 6px; width: 120px; }
.bilder img { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; display: block; }
.bilder figure div { display: flex; gap: 4px; }
.bilder figure button { min-height: 36px; padding: 0 8px; font-size: 13px; flex: 1; }
.hinweis { margin: -8px 0 0; font-size: 13px; color: var(--leise); }
.vorschlag { display: flex; align-items: center; gap: 12px; background: var(--grund); border-radius: 12px; padding: 12px 14px; flex-wrap: wrap; font-size: 14px; color: var(--text2); }
.vorschlag span { flex: 1 1 260px; }
.treffer { flex: 1 1 100%; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--grau); padding-top: 10px; font-weight: 600; color: var(--anthrazit); }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 16px; }
.aktionen { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.aktionen span { flex: 1; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--anthrazit); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px; z-index: 10; }

@media (max-width: 600px) {
  .kopf { padding: 0 16px; }
  main { padding: 20px 16px; gap: 16px; }
  .titelzeile h1 { font-size: 24px; }
  .kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kachel { padding: 14px; }
  .kachel b { font-size: 28px; }
  .fall { align-items: flex-start; gap: 12px; }
  .inhalt { flex: 1 1 180px; }
  .thumbs img, .platzhalter { width: 64px; height: 64px; }
  .geraete { align-items: flex-start; }
  dialog { padding: 16px; }
}
[hidden] { display: none !important; }
