/* Ergänzungen zu bootstrap-custom.css – Layout wie InterneSeiteApp */

:root {
  --app-header-height: 64px;
  --app-logo-height: 42px;
}

/* Topbar / Footer im FFBS-Rot, im Dark Mode grau */
.navbar.fixed-top {
  min-height: var(--app-header-height);
  padding-top: 0;
  padding-bottom: 0;
}
.navbar.fixed-top.bg-danger,
footer.fixed-bottom.bg-danger {
  background-color: #D6001C !important;
}
[data-bs-theme="dark"] .navbar.fixed-top.bg-danger,
[data-bs-theme="dark"] footer.fixed-bottom.bg-danger {
  background-color: #888888 !important;
}
[data-bs-theme="dark"] html,
[data-bs-theme="dark"] body {
  background-color: #212529;
}
.navbar.fixed-top > .container-fluid { min-height: var(--app-header-height); }
.navbar-brand { padding-top: 0; padding-bottom: 0; }
.navbar-brand img { height: var(--app-logo-height); width: auto; }

.app-main {
  padding-top: calc(var(--app-header-height) + 8px);
  padding-bottom: 72px;
}
.app-sidebar { top: calc(var(--app-header-height) + 8px); }
.logo-login { max-height: 64px; }

/* Buttons und Felder im Freien gut treffbar */
.btn, .form-control, .form-select { min-height: 42px; }
.btn-sm { min-height: 32px; }
.btn-gross { min-height: 64px; font-size: 1.2rem; font-weight: 600; }

/* Mobile Footer */
.footer-link { font-size: 1.3rem; padding: .25rem 0; }
.footer-link.active { opacity: 1; }
.footer-link:not(.active) { opacity: .8; }

/* Tabellen */
.table td.zahl, .table th.zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tr.gruppe th { background: var(--bs-tertiary-bg); }
.table .eingabe-menge { width: 7.5rem; min-width: 6rem; }
.table .eingabe-klein { width: 5.5rem; }
.table select[data-gebinde] { min-width: 10rem; }
.tabelle-sticky thead th { position: sticky; top: 0; background: var(--bs-body-bg); z-index: 1; }

.kennzahl { text-decoration: none; }
.kennzahl .wert { font-size: 2rem; font-weight: 700; line-height: 1.1; }

.produkt-bild { width: 48px; height: 48px; object-fit: cover; border-radius: .375rem; }
.produkt-bild-gross { max-width: 100%; max-height: 220px; border-radius: .375rem; }

/* Einkaufsliste am Handy: abgehakte Zeilen dezent */
.ek-position.erledigt { opacity: .6; }
.ek-position.erledigt .ek-name { text-decoration: line-through; }

/* Schnellausgabe: große Auswahl-Kacheln */
.kachel-auswahl .btn { min-height: 56px; }
.trefferliste { max-height: 50vh; overflow-y: auto; }

.nur-druck { display: none; }

@media print {
  .navbar, .app-sidebar, footer, .offcanvas, .btn, .kein-druck, .toast-container, .nav-tabs { display: none !important; }
  .nur-druck { display: block !important; }
  .app-main { padding: 0 !important; }
  .app-main > .row > section { width: 100% !important; flex: 0 0 100% !important; max-width: 100% !important; }
  .card { border: 0 !important; box-shadow: none !important; }
  .card-header { background: none !important; padding-left: 0; }
  .card-body { padding: 0 !important; }
  body { background: #fff !important; font-size: 10.5pt; }
  .table { font-size: 10pt; }
  .table td, .table th { padding: .2rem .35rem; }
  tr { break-inside: avoid; }
  input.form-control, select.form-select { border: 0; padding: 0; background: none; min-height: 0; }
  .seitenumbruch { break-before: page; }
}

/* Leiste mit Speichern-Knopf klebt unten – über dem mobilen Footer */
.leiste-unten { position: sticky; bottom: 40px; z-index: 5; }
@media (max-width: 991.98px) {
  .leiste-unten { bottom: 48px; }
}
@media print { .leiste-unten { display: none !important; } }

/* Eingabetabellen am Handy als Karten: jede Zeile umbricht, Felder mit Beschriftung */
@media (max-width: 767.98px) {
  .tabelle-mobil thead { display: none; }
  .tabelle-mobil tbody tr { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; padding: .5rem 0; border-bottom: 1px solid var(--bs-border-color); }
  .tabelle-mobil tbody td, .tabelle-mobil tbody th { border: 0; padding: .1rem .25rem; }
  .tabelle-mobil tr.gruppe { padding: 0; }
  .tabelle-mobil tr.gruppe th { flex: 1 1 100%; padding: .4rem .25rem; }
  .tabelle-mobil td.titel, .tabelle-mobil td.breit { flex: 1 1 100%; }
  .tabelle-mobil td.titel:empty { display: none; }
  .tabelle-mobil td[data-label]:not(:empty)::before { content: attr(data-label) " "; color: var(--bs-secondary-color); font-size: .8rem; }
  .tabelle-mobil td.zahl { text-align: left; }
}
