/* ═══════════════════════════════════════════════════════════════
   MP-Wartung — Touch-Optimierung für Smartphones (Handschuh-tauglich)
   Greift nur auf schmalen Bildschirmen (Smartphone/Tablet hochkant).
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* ── Eingabefelder & Dropdowns ── */
  .finput,
  input[type="text"], input[type="password"], input[type="search"],
  input[type="number"], input[type="date"], select, textarea {
    font-size: 16px !important;
    padding: 12px 13px !important;
    border-radius: 10px !important;
    border-width: 1.5px !important;
    min-height: 48px !important;
  }

  /* ── Buttons ── */
  .btn {
    font-size: 14px !important;
    padding: 12px 18px !important;
    border-radius: 10px !important;
    min-height: 48px !important;
    letter-spacing: 1px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Sekundär-Buttons (z.B. Scanner 📷) */
  .btn.btn-sec {
    min-width: 52px !important;
    font-size: 19px !important;
    padding: 12px !important;
  }

  /* ── Karten ── */
  .card {
    border-radius: 12px !important;
    padding: 14px !important;
  }

  /* ── Personen-/Listen-Karten ── */
  #wart-kld-per-list .card,
  #wart-kld-ausr-list .card {
    padding: 13px 12px !important;
    margin-bottom: 8px !important;
    background: var(--bg2) !important;
    border-radius: 10px !important;
  }

  /* Initialen-Kreis */
  #wart-kld-per-list .card > div:first-child {
    width: 40px !important;
    height: 40px !important;
    font-size: 14px !important;
  }

  /* Namen & Zusatzinfo */
  #wart-kld-per-list .card div[style*="font-weight:600"] {
    font-size: 15px !important;
  }

  /* ── Tabellen-Zeilen ── */
  table td, table th {
    padding: 11px 9px !important;
    font-size: 14px !important;
  }

  /* ── Untere Navigationsleiste ── */
  .bottom-nav-item {
    padding: 7px 4px !important;
  }
  .bottom-nav-item .bni {
    font-size: 22px !important;
  }

  /* ── Seitentitel ── */
  .page-head h2 {
    font-size: 20px !important;
  }

  .page-head { margin-bottom: 14px !important; }
}

@media (max-width: 768px) {

  /* ── Symmetrie: Such-/Button-Zeilen auf gleiche Höhe ── */
  /* Alle Flex-Zeilen die einen Button enthalten dehnen sich gleich */
  .card div[style*="display:flex"] {
    align-items: stretch !important;
  }

  /* Scanner-/Sekundär-Buttons: exakt gleiche Höhe wie Eingabefelder daneben */
  .btn.btn-sec {
    min-height: 48px !important;
    height: auto !important;
    align-self: stretch !important;
  }

  /* Alle Buttons in Flex-Zeilen: volle Höhe der Zeile */
  div[style*="display:flex"] > .btn {
    height: auto !important;
    align-self: stretch !important;
  }

  /* ZURÜCK / RÜCKGABE & ähnliche Zeilen-Buttons gleich hoch */
  .btn.btn-sec, .btn {
    box-sizing: border-box !important;
  }

  /* Detail-Kopfzeile (ZURÜCK + Name) sauber ausrichten */
  #wart-kld-detail > div:first-child {
    align-items: center !important;
  }
}

@media (max-width: 768px) {

  /* ── Seitenmenü: größere Touch-Targets ── */
  .nav-item {
    min-height: 54px !important;
    padding: 14px 14px !important;
    font-size: 16px !important;
    gap: 14px !important;
    margin-bottom: 2px !important;
  }
  .nav-item .ni {
    font-size: 20px !important;
    width: 24px !important;
  }
  .nav-sec {
    font-size: 11px !important;
    padding: 12px 12px 6px !important;
  }

  /* ── Menü-Footer: Design-Toggle, User-Card, Einstellungen, Logout ── */
  .sb-foot .finput,
  .sb-foot button {
    min-height: 50px !important;
    font-size: 15px !important;
  }
  .user-card {
    padding: 12px 12px !important;
    gap: 12px !important;
  }
  .user-card .uname { font-size: 15px !important; }
  .user-card .ulogin { font-size: 12px !important; }

  /* User-Avatar im Menü größer */
  .user-card > div:first-child {
    width: 40px !important;
    height: 40px !important;
    font-size: 15px !important;
  }
}
