:root {
  --bg: #16181d; --bg-panel: #1f232b; --bg-hover: #262b35;
  --border: #323945; --text: #e8eaee; --muted: #9aa2af;
  --akzent: #d32; --akzent-hell: #e85545; --positiv: #4caf7d; --gefahr: #e85545;
  --radius: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.5;
}
a { color: var(--akzent-hell); }
.muted { color: var(--muted); }
.num { text-align: right; }

/* Topbar */
.topbar { display: flex; align-items: center; gap: 1.6rem; padding: .7rem 1.4rem;
  background: var(--bg-panel); border-bottom: 2px solid var(--akzent); }
.marke { font-size: 1.25rem; font-weight: 800; color: var(--text); text-decoration: none; letter-spacing: .5px; }
.marke span { color: var(--akzent); }
.hauptnav { display: flex; gap: 1.1rem; }
.hauptnav a { color: var(--muted); text-decoration: none; }
.hauptnav a:hover { color: var(--text); }
.nav-rechts { margin-left: auto; display: flex; align-items: center; gap: .8rem; }
.inhalt { max-width: 1040px; margin: 0 auto; padding: 1.4rem; }
h1 { margin: .2rem 0 .6rem; } h2 { margin: .1rem 0 .6rem; font-size: 1.1rem; }

/* Buttons */
.btn { display: inline-block; background: var(--bg-hover); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: .5em 1em; text-decoration: none; cursor: pointer; font: inherit; }
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--akzent); border-color: var(--akzent); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--akzent-hell); }
.btn-gefahr { color: #fff; background: #9b3b32; border-color: #b4463b; }
.btn-klein { padding: .3em .7em; font-size: .85rem; }
.btn-reihe { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1rem 0; }
.kopf-reihe { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.zurueck { text-decoration: none; }

/* Kacheln (Start) */
.kacheln { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1.2rem 0; }
.kachel { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem 1.6rem; min-width: 150px; text-align: center; text-decoration: none; color: var(--text); }
.kachel:hover { background: var(--bg-hover); }
.kachel .zahl { font-size: 2.1rem; font-weight: 800; color: var(--akzent-hell); }
.kachel .label { color: var(--muted); margin-top: .2rem; }
.hinweis-box { background: rgba(210,60,40,.08); border: 1px solid rgba(210,60,40,.3);
  border-radius: var(--radius); padding: 1rem 1.2rem; margin-top: 1rem; }

/* Suche */
.suche { display: flex; gap: .6rem; margin: .8rem 0 1rem; }
.suche input { flex: 1; }

/* Tabellen */
.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th { text-align: left; color: var(--muted); font-weight: 600; font-size: .82rem;
  padding: .4rem .6rem; border-bottom: 1px solid var(--border); }
.tabelle td { padding: .55rem .6rem; border-bottom: 1px solid var(--border); }
.tabelle tbody tr[onclick] { cursor: pointer; }
.tabelle tbody tr[onclick]:hover { background: var(--bg-hover); }
.badge { display: inline-block; background: var(--bg-hover); border: 1px solid var(--border);
  border-radius: 6px; padding: 0 .5em; font-size: .75rem; color: var(--muted); }

/* Karten / Details */
.karten-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
@media (max-width: 760px) { .karten-grid { grid-template-columns: 1fr; } }
.karte { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0; }
.details dt { color: var(--muted); } .details dd { margin: 0; }

/* Formulare */
.formular { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.2rem; display: flex; flex-direction: column; gap: .8rem; max-width: 820px; }
.feld-gruppe { display: flex; gap: .8rem; flex-wrap: wrap; }
label { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; color: var(--muted); flex: 1; min-width: 120px; }
input, select, textarea { background: var(--bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: .5em .7em; font: inherit; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--akzent);
  box-shadow: 0 0 0 2px rgba(210,60,40,.22); }
textarea { resize: vertical; }

/* Login */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem; width: 320px; display: flex; flex-direction: column; gap: .8rem; }
.fehler { background: rgba(232,85,69,.14); border: 1px solid var(--gefahr); color: #ffb3aa;
  border-radius: 8px; padding: .5em .8em; font-size: .9rem; }

/* Pagination */
.pager { display: flex; align-items: center; gap: 1rem; justify-content: center; margin: 1.3rem 0; }
