/* ── Base ─────────────────────────────────────────────────────────────────── */
body {
  background: #f1f5f9;
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.navbar {
  background: #fff !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  font-size: 0.875rem;
  border-radius: 20px;
  text-decoration: none;
  color: #64748b;
  font-weight: 500;
  transition: all 0.15s ease;
}
.nav-pill:hover { color: #2563eb; background: #eff6ff; }
.nav-pill-active { color: #2563eb; background: #dbeafe; font-weight: 600; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: #fff;
  border: none !important;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
}
.card-header {
  background: #fff;
  border-bottom: 1px solid #f1f5f9 !important;
  border-radius: 12px 12px 0 0 !important;
  font-weight: 600;
  color: #374151;
}

/* ── List group ──────────────────────────────────────────────────────────── */
.list-group { border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.07); }
.list-group-item { background: #fff; border-color: #f1f5f9; color: #0f172a; }
.list-group-item-action:hover { background: #f8fafc; color: #0f172a; }
.list-group-item-action:active { background: #eff6ff; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-control, .form-select {
  background: #fff;
  border-color: #e2e8f0;
  border-radius: 8px;
  color: #0f172a;
}
.form-control:focus, .form-select:focus {
  background: #fff;
  border-color: #3b82f6;
  color: #0f172a;
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.form-control::placeholder { color: #94a3b8; }
.input-group .btn { border-radius: 0 8px 8px 0 !important; }
.input-group .form-control { border-radius: 8px 0 0 8px !important; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn { border-radius: 8px; font-weight: 500; }
.btn-primary { background: #2563eb; border-color: #2563eb; }
.btn-primary:hover { background: #1d4ed8; border-color: #1d4ed8; }
.btn-success { background: #16a34a; border-color: #16a34a; }
.btn-success:hover { background: #15803d; border-color: #15803d; }
.btn-outline-secondary { color: #475569; border-color: #cbd5e1; }
.btn-outline-secondary:hover { background: #f1f5f9; color: #0f172a; border-color: #94a3b8; }
.btn-outline-danger { color: #dc2626; border-color: #fca5a5; }
.btn-outline-danger:hover { background: #fef2f2; }

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge { font-weight: 500; border-radius: 6px; }
.bg-secondary { background: #e2e8f0 !important; color: #475569 !important; }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table { color: #0f172a; }
.table-active { background: #eff6ff !important; }

/* ── Tabs (in cards) ─────────────────────────────────────────────────────── */
.nav-tabs .nav-link { color: #64748b; border-radius: 8px 8px 0 0; font-size: 0.875rem; }
.nav-tabs .nav-link.active { color: #2563eb; font-weight: 600; border-bottom-color: #fff; }
.nav-tabs .nav-link:hover:not(.active) { color: #0f172a; background: #f8fafc; }

/* ── Misc ────────────────────────────────────────────────────────────────── */
.font-monospace { font-family: 'Menlo', 'Courier New', monospace; }
#qr-reader video { border-radius: 8px; }
.alert-sm { font-size: 0.875rem; }

/* ── Flash-Meldungen ─────────────────────────────────────────────────────── */
.flash-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1rem;
  z-index: 1055;
  width: 300px;
  max-width: calc(100vw - 2rem);
  pointer-events: none;
}
.flash-container .alert { pointer-events: all; box-shadow: 0 4px 12px rgba(0,0,0,.12); }

/* ── Navbar zweite Zeile ─────────────────────────────────────────────────── */
.nav-actions-row:empty { display: none !important; }

/* ── Mobile: Daumen-Leiste unten ─────────────────────────────────────────── */
@media (max-width: 767px) {
  .nav-actions-row:not(:empty) {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    padding: 0.75rem 1rem env(safe-area-inset-bottom, 0);
    justify-content: center;
    gap: 0.5rem !important;
    z-index: 1040;
    box-shadow: 0 -4px 12px rgba(0,0,0,.07);
  }
  .nav-actions-row:not(:empty) .btn {
    flex: 1;
    min-width: 80px;
    max-width: 160px;
    padding: 0.6rem 0.5rem;
    font-size: 0.9rem;
  }
  body { padding-bottom: 5rem; }
  .flash-container { bottom: 5.5rem; }
  h4 { font-size: 1.1rem; }
}
