body { background: #f6f7f9; }
.card { border-color: #e3e6ea; }
table.buchungen td { font-size: .925rem; }
.print-only { display: none; }

.signaturen {
  margin-top: 4rem;
  gap: 3rem;
}
.signaturen > div {
  flex: 1;
  border-top: 1px solid #333;
  padding-top: .25rem;
  font-size: .85rem;
}

@media print {
  body { background: #fff; }
  .no-print, .navbar, .btn { display: none !important; }
  .print-only { display: block; }
  .print-only.signaturen { display: flex; }
  main.container-lg { max-width: 100%; padding: 0; }
  .card { border: none; }
  a { color: inherit; text-decoration: none; }
  .badge { border: 1px solid #999; color: #000 !important; background: none !important; }
}

/* Belegerfassung */
.beleg-zone {
  border: 2px dashed #b6bec8;
  border-radius: .5rem;
  padding: 1.25rem 1rem;
  text-align: center;
  background: #fbfcfd;
  transition: background .15s, border-color .15s;
}
.beleg-zone.aktiv { border-color: #0d6efd; background: #eef4ff; }
.beleg-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .5rem; }
.beleg-vorschau {
  display: flex; align-items: center; gap: .6rem;
  border: 1px solid #e3e6ea; border-radius: .4rem; padding: .4rem; background: #fff; min-width: 0;
}
.beleg-vorschau img, .beleg-pdf {
  width: 48px; height: 48px; object-fit: cover; border-radius: .25rem; flex-shrink: 0;
}
.beleg-pdf {
  display: flex; align-items: center; justify-content: center;
  background: #fde8e8; color: #b42318; font-weight: 600; font-size: .8rem;
}
.beleg-info { flex: 1; min-width: 0; font-size: .875rem; }

.kamera-bild { position: relative; background: #000; border-radius: .4rem; overflow: hidden; }
.kamera-bild video { display: block; width: 100%; max-height: 65vh; object-fit: contain; }
.kamera-blitz { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.kamera-blitz.an { animation: blitz .35s ease-out; }
@keyframes blitz { from { opacity: .8; } to { opacity: 0; } }

/* Belege an der Buchung */
.beleg-galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.beleg-karte { border: 1px solid #e3e6ea; border-radius: .4rem; background: #fff; overflow: hidden; }
.beleg-karte .beleg-bild {
  display: flex; align-items: center; justify-content: center;
  height: 150px; background: #f1f3f5;
}
.beleg-karte .beleg-bild img { max-width: 100%; max-height: 150px; object-fit: contain; }
.beleg-karte .beleg-bild .beleg-pdf { width: 64px; height: 64px; font-size: 1rem; }
.beleg-karte .beleg-text { padding: .4rem .5rem; font-size: .8rem; }
.beleg-ansicht { width: 100%; height: 75vh; border: 0; background: #f1f3f5; }
.beleg-ansicht-bild { max-width: 100%; max-height: 75vh; display: block; margin: 0 auto; }

@media print {
  .beleg-zone, .beleg-liste { display: none !important; }
}

/* ---------- Kopf- und Unterleiste, Handy ---------- */
.kopfleiste { background: #1f2a37; padding-top: max(.5rem, env(safe-area-inset-top)); }
.min-w-0 { min-width: 0; }

.unterleiste {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
  display: flex; justify-content: space-around; align-items: stretch;
  background: #fff; border-top: 1px solid #dfe3e8;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, .05);
}
.unterleiste a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; padding: .45rem 0 .4rem; min-height: 58px;
  color: #6b7480; text-decoration: none; font-size: .7rem;
}
.unterleiste a i { font-size: 1.35rem; line-height: 1; }
.unterleiste a.aktiv { color: #0d6efd; }
.unterleiste a.plus i {
  background: #0d6efd; color: #fff; border-radius: 50%;
  width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-top: -18px; box-shadow: 0 3px 10px rgba(13, 110, 253, .35);
}
.unterleiste a.plus.aktiv { color: #0d6efd; }

.buchungsliste .list-group-item { padding: .7rem .85rem; }
.buchungsliste .storniert .fw-semibold { text-decoration: line-through; color: #8a929b; }

@media (max-width: 991.98px) {
  body.mit-unterleiste { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}

@media (max-width: 767.98px) {
  /* 16px verhindert das automatische Hineinzoomen auf iPhones */
  .form-control, .form-select, .form-control-sm, .form-select-sm { font-size: 16px; }
  .form-control, .form-select { min-height: 44px; }
  .btn { min-height: 42px; }
  .btn-sm { min-height: 34px; }
  h1.h3 { font-size: 1.35rem; }
  main.container-lg { padding-left: 12px; padding-right: 12px; }
  .card-body { padding: .85rem; }
  .handy-volle-breite { width: 100%; }
  .handy-volle-breite > .btn { flex: 1; }
  .formular-aktionen { display: grid !important; grid-template-columns: 1fr; }
  .formular-aktionen .btn-link { order: 3; }
  .beleg-zone { padding: 1rem .75rem; }
  .beleg-zone .btn { flex: 1 1 100%; }
  .beleg-galerie { grid-template-columns: repeat(2, 1fr); }
  .kamera-bild video { max-height: 55vh; }
  .table { font-size: .9rem; }
}

@media print {
  .unterleiste, .kopfleiste { display: none !important; }
  body.mit-unterleiste { padding-bottom: 0; }
}
