/* ═══════════════════════════════════════════════════════════
   JAGD-CRM · app.css
   Ästhetik: Alpines Dunkel — Holz, Stein, Nebelwald.
   Fonts: Playfair Display (Display) + Source Serif 4 (Body)
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;900&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;1,8..60,300&display=swap');

/* ── Design Tokens ──────────────────────────────────────────────────────── */
:root {
  /* Palette: Nacht im Revier */
  --c-bg:           #0e110d;   /* Tiefstes Dunkelgrün-Schwarz */
  --c-bg-2:         #161a14;   /* Karten-Hintergrund */
  --c-bg-3:         #1e2419;   /* Inputs, Cards */
  --c-bg-4:         #252c1f;   /* Hover-States */
  --c-border:       #2d3628;   /* Subtile Trennlinien */
  --c-border-light: #3a4432;   /* Sichtbarere Linien */

  /* Grüntöne – Wald */
  --c-green:        #6b9e52;   /* Primärfarbe – Waldgrün */
  --c-green-light:  #8dc46e;   /* Hover / Aktiv */
  --c-green-dim:    #3d5c2e;   /* Gedämpft / Disabled */
  --c-green-glow:   rgba(107, 158, 82, 0.18);

  /* Akzente */
  --c-amber:        #c9853a;   /* Warnungen, Schuss */
  --c-amber-dim:    rgba(201, 133, 58, 0.15);
  --c-red:          #c0392b;   /* Fehler, Heatmap */
  --c-red-dim:      rgba(192, 57, 43, 0.15);
  --c-blue:         #4a7fa5;   /* Info */

  /* Text */
  --c-text:         #d4cfc4;   /* Haupttext – altes Papier */
  --c-text-2:       #8a8679;   /* Sekundärtext */
  --c-text-3:       #585550;   /* Tertiärtext / Placeholder */
  --c-text-inv:     #0e110d;   /* Text auf hellem Hintergrund */

  /* Typografie */
  --f-display: 'Playfair Display', Georgia, serif;
  --f-body:    'Source Serif 4', Georgia, serif;
  --f-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Abstände */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Radien */
  --r-sm:  4px;
  --r-md:  8px;
  --r-lg:  14px;
  --r-xl:  20px;
  --r-full: 9999px;

  /* Schatten */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.6);
  --shadow-green: 0 0 20px rgba(107,158,82,0.25);

  /* Übergänge */
  --t-fast:   150ms ease;
  --t-normal: 250ms ease;
  --t-slow:   400ms ease;

  /* Layout */
  --sidebar-w: 240px;
  --topbar-h:  56px;
  --topbar-h-safe: calc(56px + env(safe-area-inset-top, 0px));
  --max-content: 1200px;
}

/* ── Reset & Base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background-color: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-body);
  font-weight: 300;
  line-height: 1.65;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--c-bg-2); }
::-webkit-scrollbar-thumb { background: var(--c-border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-green-dim); }

/* Selektion */
::selection { background: var(--c-green-dim); color: var(--c-green-light); }

/* ── Typografie ─────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-text);
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 900; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }

a { color: var(--c-green-light); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--c-green); }

code, pre {
  font-family: var(--f-mono);
  font-size: 0.875em;
  background: var(--c-bg-3);
  border-radius: var(--r-sm);
}
code { padding: 0.15em 0.4em; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-family: var(--f-body);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t-normal);
  white-space: nowrap;
  text-decoration: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:disabled:active { transform: none; }

/* Primär */
.btn-primary {
  background: var(--c-green);
  color: var(--c-text-inv);
  border-color: var(--c-green);
  box-shadow: 0 2px 8px rgba(107,158,82,0.3);
}
.btn-primary:hover:not(:disabled) {
  background: var(--c-green-light);
  border-color: var(--c-green-light);
  box-shadow: var(--shadow-green);
  color: var(--c-text-inv);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--c-text-2);
  border-color: var(--c-border-light);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--c-bg-4);
  color: var(--c-text);
  border-color: var(--c-green-dim);
}

/* Danger */
.btn-danger {
  background: var(--c-red-dim);
  color: var(--c-red);
  border-color: var(--c-red);
}
.btn-danger:hover:not(:disabled) {
  background: var(--c-red);
  color: #fff;
}

/* Größen */
.btn-sm { padding: var(--space-2) var(--space-3); font-size: 0.82rem; }
.btn-lg { padding: var(--space-4) var(--space-8); font-size: 1.05rem; }
.btn-full { width: 100%; }

/* Loading Spinner im Button */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px; height: 18px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  color: var(--c-text-inv);
}

/* ── Inputs & Forms ─────────────────────────────────────────────────────── */
.form-group { margin-bottom: var(--space-5); }

.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-text-2);
}

.form-control {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--c-bg-3);
  color: var(--c-text);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-family: var(--f-body);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.5;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  -webkit-appearance: none;
  appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--c-green);
  background: var(--c-bg-4);
  box-shadow: 0 0 0 3px var(--c-green-glow);
}

.form-control::placeholder { color: var(--c-text-3); }

.form-control.is-error { border-color: var(--c-red); }
.form-control.is-error:focus { box-shadow: 0 0 0 3px var(--c-red-dim); }

.form-error {
  margin-top: var(--space-2);
  font-size: 0.82rem;
  color: var(--c-red);
}

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a8679' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-10);
}

textarea.form-control { resize: vertical; min-height: 100px; }

/* Checkbox */
.form-check {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
}
.form-check-input {
  width: 18px; height: 18px;
  background: var(--c-bg-3);
  border: 1px solid var(--c-border-light);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--t-fast);
  flex-shrink: 0;
  -webkit-appearance: none;
  appearance: none;
  position: relative;
}
.form-check-input:checked {
  background: var(--c-green);
  border-color: var(--c-green);
}
.form-check-input:checked::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 10px; height: 7px;
  border: 2px solid #fff;
  border-top: none;
  border-right: none;
  transform: rotate(-45deg) translateY(-1px);
}
.form-check-label { font-size: 0.95rem; color: var(--c-text); cursor: pointer; }

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--c-bg-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.card-body { padding: var(--space-6); }
.card-header {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.card-title {
  font-family: var(--f-display);
  font-size: 1.1rem;
  font-weight: 700;
}

/* ── Alerts / Toasts ────────────────────────────────────────────────────── */
.alert {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}
.alert-error   { background: var(--c-red-dim);   border-color: var(--c-red);   color: #e57373; }
.alert-success { background: var(--c-green-glow); border-color: var(--c-green); color: var(--c-green-light); }
.alert-warning { background: var(--c-amber-dim);  border-color: var(--c-amber); color: var(--c-amber); }

/* Toast Container */
#toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  /* über allen Dialogen (Overlays nutzen bis 9999) */
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}
.toast {
  padding: var(--space-3) var(--space-5);
  border-radius: var(--r-md);
  font-size: 0.9rem;
  font-weight: 400;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease forwards;
  pointer-events: all;
  max-width: 320px;
  border-left: 3px solid;
}
.toast-success { background: var(--c-bg-3); border-color: var(--c-green); }
.toast-error   { background: var(--c-bg-3); border-color: var(--c-red);   }
.toast-info    { background: var(--c-bg-3); border-color: var(--c-blue);  }
.toast.hiding  { animation: toastOut 0.3s ease forwards; }

/* ── Badges ─────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px var(--space-2);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--r-full);
}
.badge-green  { background: var(--c-green-glow); color: var(--c-green-light); }
.badge-red    { background: var(--c-red-dim);     color: var(--c-red); }
.badge-amber  { background: var(--c-amber-dim);   color: var(--c-amber); }
.badge-gray   { background: var(--c-bg-4);        color: var(--c-text-2); }

/* ── Spinner ────────────────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 24px; height: 24px;
  border: 2px solid var(--c-border-light);
  border-top-color: var(--c-green);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.spinner-sm { width: 16px; height: 16px; }
.spinner-lg { width: 40px; height: 40px; border-width: 3px; }

/* ── App-Shell Layout ───────────────────────────────────────────────────── */
#app {
  display: flex;
  min-height: 100dvh;
}

/* Sidebar */
#sidebar {
  width: var(--sidebar-w);
  background: var(--c-bg-2);
  border-right: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 200;
  transition: transform var(--t-normal);
  /* iOS PWA: Notch/Dynamic Island */
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.sidebar-logo {
  padding: var(--space-6) var(--space-5);
  border-bottom: 1px solid var(--c-border);
}
.sidebar-logo-mark {
  font-family: var(--f-display);
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--c-text);
  letter-spacing: -0.02em;
  line-height: 1;
}
.sidebar-logo-sub {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-text-3);
  margin-top: var(--space-1);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) 0;
}

.nav-section-label {
  padding: var(--space-3) var(--space-5) var(--space-2);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-text-3);
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  color: var(--c-text-2);
  font-size: 0.92rem;
  font-weight: 400;
  transition: all var(--t-fast);
  cursor: pointer;
  border-left: 2px solid transparent;
  text-decoration: none;
}
.nav-item:hover {
  color: var(--c-text);
  background: var(--c-bg-4);
}
.nav-item.active {
  color: var(--c-green-light);
  background: var(--c-green-glow);
  border-left-color: var(--c-green);
  font-weight: 600;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.8; }
.nav-item.active svg { opacity: 1; }

.sidebar-footer {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--c-border);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.sidebar-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--c-green-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--c-green-light);
  flex-shrink: 0;
}
.sidebar-user-name { font-size: 0.88rem; font-weight: 600; color: var(--c-text); }
.sidebar-user-role { font-size: 0.72rem; color: var(--c-text-3); }

/* Topbar (Mobile) */
#topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-h);          /* Fallback */
  height: var(--topbar-h-safe);     /* Mit safe-area */
  background: var(--c-bg-2);
  border-bottom: 1px solid var(--c-border);
  z-index: 300;
  padding: 0 var(--space-5);
  padding-top: env(safe-area-inset-top, 0px); /* Notch-Abstand */
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

#main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.page {
  display: none;
  padding: var(--space-8);
  max-width: var(--max-content);
  width: 100%;
}
.page.active { display: block; }

.page-header {
  margin-bottom: var(--space-8);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.page-title { font-family: var(--f-display); font-weight: 900; }
.page-subtitle { color: var(--c-text-2); font-size: 0.9rem; margin-top: var(--space-1); }

/* Sidebar Overlay (Mobile) */
#sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 190;
  backdrop-filter: blur(2px);
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  #topbar { display: flex; }
  #sidebar {
    transform: translateX(-100%);
    top: 0;
    /* Sidebar auf Mobile: safe-area nur links */
    padding-top: env(safe-area-inset-top, 0px);
  }
  #sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  #sidebar-overlay.open { display: block; }
  /* main-content muss so weit nach unten wie der Topbar inkl. Notch */
  #main-content {
    margin-left: 0;
    padding-top: var(--topbar-h);           /* Fallback */
    padding-top: var(--topbar-h-safe);      /* Mit safe-area */
  }
  .page { padding: var(--space-5); }
  .page-header { flex-direction: column; }
}

/* ── Utility Classes ────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--c-text-2); }
.text-small  { font-size: 0.85rem; }
.text-xs     { font-size: 0.75rem; }
.text-green  { color: var(--c-green-light); }
.text-red    { color: var(--c-red); }
.text-amber  { color: var(--c-amber); }

.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-2       { gap: var(--space-2); }
.gap-3       { gap: var(--space-3); }
.gap-4       { gap: var(--space-4); }

.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }

.hidden  { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Trennlinie */
.divider {
  border: none;
  border-top: 1px solid var(--c-border);
  margin: var(--space-6) 0;
}

/* ── Animationen ────────────────────────────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(20px); }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

/* Skeleton Loader */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--c-bg-3) 25%,
    var(--c-bg-4) 50%,
    var(--c-bg-3) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--r-md);
}

/* Page Enter Animation */
.page.active { animation: fadeIn 0.25s ease forwards; }

/* ── Offline-Banner ─────────────────────────────────────────────────────── */
#offline-banner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--c-amber);
  color: var(--c-text-inv);
  text-align: center;
  padding: var(--space-2) var(--space-4);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
#offline-banner.show { display: block; }
/* Offline-Banner (34px): Desktop ganz oben (Sidebar/Inhalt rücken nach unten),
   Handy direkt UNTER der Kopfleiste – nicht in der Notch / Statusleiste */
body.is-offline #sidebar { top: 34px; }
body.is-offline #main-content { padding-top: 34px; }
@media (max-width: 768px) {
  #offline-banner { top: var(--topbar-h-safe); }
  body.is-offline #sidebar { top: 0; }
  body.is-offline #main-content { padding-top: calc(var(--topbar-h-safe) + 34px); }
}

/* ── PWA Install Banner ─────────────────────────────────────────────────── */
#pwa-install-banner {
  display: none;
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  background: var(--c-bg-3);
  border: 1px solid var(--c-border-light);
  border-radius: var(--r-lg);
  padding: var(--space-4) var(--space-6);
  box-shadow: var(--shadow-lg);
  z-index: 500;
  display: none;
  align-items: center;
  gap: var(--space-4);
  max-width: 400px;
  width: calc(100% - 2rem);
  font-size: 0.9rem;
}
#pwa-install-banner.show { display: flex; animation: fadeIn 0.3s ease; }

/* ══════════════════════════════════════════════════════════════════════════
   DRUCK-STILE (@media print)
   Globale Basis — stats.js injiziert ergänzend Sektion-Sichtbarkeit.
   ══════════════════════════════════════════════════════════════════════════ */

@media print {

  /* ── App-Chrome ausblenden ─────────────────────────────────────────── */
  #sidebar,
  #topbar,
  #sidebar-overlay,
  #offline-banner,
  #toast-container,
  #pwa-install-banner {
    display: none !important;
  }

  /* ── Alle Seiten ausblenden ausser der aktiven ──────────────────────── */
  .page { display: none !important; }
  .page.active { display: block !important; }

  /* ── Layout normalisieren ───────────────────────────────────────────── */
  body { background: white !important; color: #111 !important; }
  #app { display: block !important; }
  #main-content {
    margin-left: 0 !important;
    padding-top: 0 !important;
    padding: 0 !important;
  }
  .page-header { margin-bottom: 6mm !important; }

  /* ── Karten-Styling für Druck ───────────────────────────────────────── */
  .card {
    box-shadow: none !important;
    border: 1px solid #bbb !important;
    break-inside: avoid;
    margin-bottom: 5mm;
    page-break-inside: avoid;
  }
  .card-header { border-bottom: 1px solid #ccc !important; }
  .card-title  { color: #111 !important; }
  .card-body   { color: #111 !important; background: white !important; }

  /* ── Farben für Druck (print-color-adjust) ──────────────────────────── */
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* ── Skeleton und Spinner ausblenden ───────────────────────────────── */
  .skeleton, .spinner { display: none !important; }

  /* ── Buttons + Toolbars ausblenden ─────────────────────────────────── */
  button, .btn, #stats-toolbar { display: none !important; }
  a.btn { display: none !important; }

  /* ── Tabellen optimieren ────────────────────────────────────────────── */
  table { width: 100% !important; border-collapse: collapse !important; font-size: 9pt; }
  th, td { padding: 4px 6px !important; border-bottom: 1px solid #ddd !important; }
  thead th { background: #f0f0f0 !important; color: #111 !important;
             border-bottom: 2px solid #999 !important; }
  tr { page-break-inside: avoid; }

  /* ── SVG-Charts im Druck ────────────────────────────────────────────── */
  svg { max-width: 100% !important; }

  /* ── Badges ─────────────────────────────────────────────────────────── */
  .badge { border: 1px solid #999 !important; background: #f5f5f5 !important;
           color: #333 !important; }

  /* ── Seitenumbruch-Hinweise ─────────────────────────────────────────── */
  h1, h2, h3 { page-break-after: avoid; }
  .card { page-break-inside: avoid; }

  /* ── Seitengrösse ───────────────────────────────────────────────────── */
  @page {
    size: A4 portrait;
    margin: 15mm 12mm;
  }
}
