body {
  background-color: #f8f9fa;
}

.navbar {
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.card {
  border-radius: 10px;
}

.card-header {
  border-radius: 10px 10px 0 0 !important;
  font-size: 0.95rem;
}

.display-5 {
  font-size: 2.2rem;
}

.font-monospace {
  font-size: 0.9em;
}

/* Suchfeld gross und zentral */
.input-group-lg .form-control {
  font-size: 1.3rem;
}

/* Paket-Karte Hover */
.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
  transition: box-shadow 0.2s;
}

/* Klickbare Tabellenzeilen */
.cursor-pointer { cursor: pointer; }

/* Login-Seite */
body:has(.card.shadow-sm):not(:has(.navbar)) {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  min-height: 100vh;
}

/* ─── Tastatur-Trigger (Touch-Geräte) ────────────────────── */
.tap-to-type {
  display: none; /* auf Desktop versteckt */
}

@media (hover: none) and (pointer: coarse) {
  /* Nur auf echten Touch-Geräten sichtbar */
  .tap-to-type {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    background: #198754;
    color: white;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    animation: tapPulse 2s ease-in-out infinite;
    box-shadow: 0 4px 14px rgba(25, 135, 84, 0.4);
  }

  @keyframes tapPulse {
    0%, 100% { transform: scale(1);    box-shadow: 0 4px 14px rgba(25,135,84,0.4); }
    50%       { transform: scale(1.03); box-shadow: 0 6px 20px rgba(25,135,84,0.6); }
  }
}

/* ─── Tablet / Mobile ─────────────────────────────────────── */
@media (max-width: 991px) {

  /* Navbar: kompakter, wichtigste Links bleiben sichtbar */
  .navbar {
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem !important;
  }
  .navbar .nav-link {
    font-size: 0.82rem;
    padding: 0.25rem 0.4rem !important;
  }
  /* Timer-Widget auf Mobil etwas kleiner */
  #work-timer, #auftrag-timer {
    font-size: 0.85rem;
  }

  /* Container mehr Luft lassen */
  .container { padding-left: 0.75rem; padding-right: 0.75rem; }

  /* Suchseite: Eingabefeld noch größer */
  .input-group-lg .form-control {
    font-size: 1.6rem;
    padding: 0.75rem 1rem;
    height: auto;
  }
  .input-group-lg .btn {
    font-size: 1.4rem;
    padding: 0.75rem 1.2rem;
  }

  /* Bestätigungs-Button gross und gut tippbar */
  .btn-lg {
    padding: 0.9rem 1.2rem;
    font-size: 1.1rem;
    min-height: 56px;
  }

  /* Paket-Karten: Infos und Button untereinander auf schmalem Screen */
  .card-body .d-flex.justify-content-between {
    flex-direction: column;
    gap: 1rem;
  }
  .card-body .d-flex.justify-content-between .text-end {
    text-align: left !important;
  }
  .card-body .d-flex.justify-content-between form {
    width: 100%;
  }
  .card-body .d-flex.justify-content-between form .btn {
    width: 100%;
  }

  /* Anzahl-Pakete + Button nebeneinander auf Tablet */
  .card-body .d-flex.justify-content-between .mb-2 {
    display: inline-block;
    margin-right: 0.5rem;
    width: auto;
  }

  /* Dashboard-Kennzahlen: 2 pro Zeile statt 5 */
  .row.g-3 .col {
    flex: 0 0 50%;
    max-width: 50%;
  }

  /* Alle Tabellen in Cards automatisch scrollbar */
  .card-body.p-0 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 575px) {
  /* Smartphone: fast alles auf volle Breite */
  .row.g-3 .col {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .display-5 { font-size: 1.8rem; }
}
