/* Responsive, barrierefreundliches Design für die App */
/* Farben und Typografie definieren (Dark/Light möglich via prefers-color-scheme) */
:root{
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #0a5bd3;
  --primary-600: #0a57c5;
  --accent: #16a34a;
  --shadow: 0 1px 2px rgba(0,0,0,.04);
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary); text-decoration: none; }
a:focus { outline: 3px solid #7aa6ff; outline-offset: 2px; border-radius: 4px; }
.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}
/* Header (Topbar) */
.app-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700;
  font-size: clamp(1.05rem, 0.9rem + 1vw, 1.4rem);
}
.brand .logo {
  width: 34px; height: 34px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  color: #fff; font-weight: 900;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.nav {
  display: flex; align-items: center; gap: 8px;
}
.nav ul { list-style: none; padding: 0; margin: 0; }
.nav li { border-bottom: 1px solid var(--border); }
.nav a {
  display: block;
  padding: 12px 16px;
  color: var(--text);
  text-decoration: none;
  border-radius: 6px;
  transition: background .15s ease;
}
.nav a:hover { background: #f1f5f9; }
.btn, .btn:focus { outline: none; }
/* Großzügige, barrierefreie Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 14px; border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff; color: var(--text); cursor: pointer;
  font-weight: 600; font-size: 0.95rem;
}
.btn.primary {
  background: var(--primary); color: #fff; border: none;
  box-shadow: 0 2px 6px rgba(10,91,211,.35);
}
.btn.secondary { background: #f8fafc; }
/* Mobile-Hamburger (sichtbar immer) */
.icon-btn {
  display: inline-flex; width: 40px; height: 40px; align-items: center;
  justify-content: center; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; cursor: pointer; font-size: 1.25rem;
}
/* Navigation unterhalb des Headers (expandierbar) */
#main-nav { display: none; width: 100%; background: var(--surface); padding: 0; }
#main-nav.open { display: block; padding: 6px 0; }
/* Mobil: vertikale, eingerückte Untermenüs */
.nav { width: 100%; }
.nav ul { list-style: none; padding: 0; margin: 0; }
.nav li { border-bottom: 1px solid var(--border); }
.nav li.has-sub { position: relative; }
.nav .submenu {
  list-style: none; padding: 0; margin: 0; overflow: hidden;
  max-height: 0; transition: max-height .25s ease;
  padding-left: 1.5rem; /* eingerücktes Untermenü */
}
.nav li.open > .submenu { max-height: 500px; }
.nav > ul > li > a { display: block; padding: 12px 16px; }
/* Hauptmenüpunkte farblich hervorheben, wenn geöffnet */
#main-nav.open > ul > li > a {
  background: #e6f0ff;
  color: var(--primary);
  border-radius: 6px;
}
/* Untermenüs beim Klick öffnen (kein Hover) */
.submenu-toggle { display: none; }
/* Desktop-Ansicht aktiv deaktiviert: kein Desktop-Menü angezeigt */
@media (min-width: 0px) {
  /* Kein Desktop-Menü; Navigation wird nur über Burger geöffnet */
  #main-nav { display: none; }
  #main-nav.open { display: block; }
}
/* Dunkles Theme (optional) */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020;
    --surface: #141a2a;
    --text: #e8e8f0;
    --muted: #a3a3b8;
    --border: #2a2f47;
    --primary: #6ea8ff;
  }
  .nav a { color: #e8e8f0; }
  table { color: #e8e8f0; }
}