/* ═══════════════════════════════════════════════════════════════════════════
   Reiseplaner – Liquid-Glass-Designsystem
   Glass-Panels über animiertem Aurora-Hintergrund, 0.5px-Konturen,
   gestufte Radien (10/16/20/980), konsequenter Dark Mode.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --sidebar-w: 244px;

  /* Liquid Glass (hell) */
  --glass-bg:        rgba(255,255,255,0.38);
  --glass-bg-strong: rgba(255,255,255,0.52);
  --glass-border:    rgba(255,255,255,0.70);
  --glass-highlight: rgba(255,255,255,0.90);
  --glass-blur:      blur(28px) saturate(200%);
  --glass-blur-lg:   blur(42px) saturate(220%);

  /* Aurora-Tints */
  --aurora-1: rgba(29,158,117,0.26);
  --aurora-2: rgba(120,80,255,0.22);
  --aurora-3: rgba(48,209,88,0.16);
  --aurora-4: rgba(255,140,30,0.16);

  --sidebar-bg:    rgba(236,236,238,0.72);
  --accent:        #1D9E75;
  --accent-hover:  #0F6E56;
  --accent-tint:   rgba(29,158,117,0.12);
  --page-bg:       #f5f5f7;
  --card-bg:       #ffffff;
  --card-glass:    rgba(255,255,255,0.72);
  --text:          #1d1d1f;
  --text-2:        #515154;
  --muted:         #86868b;
  --border:        #d2d2d7;
  --border-light:  #ededf0;
  --separator:     rgba(0,0,0,0.07);
  --hover-fill:    rgba(0,0,0,0.05);
  --fill-quaternary: rgba(120,120,128,0.12);
  --segment-active: #ffffff;
  --success:       #30a14e;
  --success-strong:#1a7c3d;
  --success-bg:    #f0fdf4;
  --danger:        #e0322a;
  --danger-strong: #c0392b;
  --danger-bg:     #fff5f4;
  --warning:       #d97a0a;
  --warning-strong:#a85d06;
  --warning-bg:    #fffaf0;
  --info:          #1D9E75;
  --info-bg:       #E1F5EE;
  --topbar-bg:     rgba(245,245,247,0.8);
  --map-land:      #c9cbd1;
  --map-land-line: rgba(255,255,255,0.85);
  --map-water:     transparent;

  --radius-sm:   10px;
  --radius:      16px;
  --radius-lg:   20px;
  --radius-full: 980px;

  --space-1:4px;  --space-2:8px;  --space-3:12px; --space-4:16px;
  --space-6:24px; --space-8:32px; --space-12:48px; --space-16:64px;

  --shadow-sm: 0 0 0 0.5px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.05);
  --shadow:    0 0 0 0.5px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.05);
  --shadow-lg: 0 0 0 0.5px rgba(0,0,0,0.04), 0 8px 28px rgba(0,0,0,0.09);

  --duration-fast: 150ms;
  --duration-base: 300ms;
  --duration-slow: 500ms;
  --ease-out:    cubic-bezier(0,0,0.2,1);
  --ease-in-out: cubic-bezier(0.4,0,0.2,1);
  --ease-spring: cubic-bezier(0.32,0.72,0,1);
}

/* ── Dark Mode ──────────────────────────────────────────────────────────── */
:root[data-theme="dunkel"] {
  --glass-bg:        rgba(40,40,44,0.38);
  --glass-bg-strong: rgba(48,48,52,0.52);
  --glass-border:    rgba(255,255,255,0.14);
  --glass-highlight: rgba(255,255,255,0.16);
  --aurora-1: rgba(45,190,142,0.55);
  --aurora-2: rgba(120,90,255,0.48);
  --aurora-3: rgba(48,209,88,0.34);
  --aurora-4: rgba(255,150,30,0.30);
  --sidebar-bg:    rgba(28,28,30,0.72);
  --accent:        #2DBE8E;
  --accent-hover:  #46D0A4;
  --accent-tint:   rgba(45,190,142,0.20);
  --page-bg:       #000000;
  --card-bg:       #1c1c1e;
  --card-glass:    rgba(44,44,46,0.72);
  --text:          #f5f5f7;
  --text-2:        #c7c7cc;
  --muted:         #8e8e93;
  --border:        #38383a;
  --border-light:  #2c2c2e;
  --separator:     rgba(255,255,255,0.10);
  --hover-fill:    rgba(255,255,255,0.07);
  --fill-quaternary: rgba(120,120,128,0.24);
  --segment-active: #636366;
  --success:       #30d158;
  --success-strong:#30d158;
  --success-bg:    rgba(48,209,88,0.14);
  --danger:        #ff453a;
  --danger-strong: #ff453a;
  --danger-bg:     rgba(255,69,58,0.14);
  --warning:       #ff9f0a;
  --warning-strong:#ff9f0a;
  --warning-bg:    rgba(255,159,10,0.14);
  --info:          #2DBE8E;
  --info-bg:       rgba(45,190,142,0.14);
  --topbar-bg:     rgba(0,0,0,0.7);
  --map-land:      #3a3a3e;
  --map-land-line: rgba(0,0,0,0.55);
  --shadow-sm: 0 0 0 0.5px rgba(0,0,0,0.5), 0 1px 2px rgba(0,0,0,0.4);
  --shadow:    0 0 0 0.5px rgba(0,0,0,0.5), 0 1px 2px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.45);
  --shadow-lg: 0 0 0 0.5px rgba(0,0,0,0.5), 0 8px 28px rgba(0,0,0,0.55);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="hell"]) {
    --glass-bg:        rgba(40,40,44,0.38);
    --glass-bg-strong: rgba(48,48,52,0.52);
    --glass-border:    rgba(255,255,255,0.14);
    --glass-highlight: rgba(255,255,255,0.16);
    --aurora-1: rgba(45,190,142,0.55);
    --aurora-2: rgba(120,90,255,0.48);
    --aurora-3: rgba(48,209,88,0.34);
    --aurora-4: rgba(255,150,30,0.30);
    --sidebar-bg:    rgba(28,28,30,0.72);
    --accent:        #2DBE8E;
    --accent-hover:  #46D0A4;
    --accent-tint:   rgba(45,190,142,0.20);
    --page-bg:       #000000;
    --card-bg:       #1c1c1e;
    --card-glass:    rgba(44,44,46,0.72);
    --text:          #f5f5f7;
    --text-2:        #c7c7cc;
    --muted:         #8e8e93;
    --border:        #38383a;
    --border-light:  #2c2c2e;
    --separator:     rgba(255,255,255,0.10);
    --hover-fill:    rgba(255,255,255,0.07);
    --fill-quaternary: rgba(120,120,128,0.24);
    --segment-active: #636366;
    --success:       #30d158;
    --success-strong:#30d158;
    --success-bg:    rgba(48,209,88,0.14);
    --danger:        #ff453a;
    --danger-strong: #ff453a;
    --danger-bg:     rgba(255,69,58,0.14);
    --warning:       #ff9f0a;
    --warning-strong:#ff9f0a;
    --warning-bg:    rgba(255,159,10,0.14);
    --info:          #2DBE8E;
    --info-bg:       rgba(45,190,142,0.14);
    --topbar-bg:     rgba(0,0,0,0.7);
    --map-land:      #3a3a3e;
    --map-land-line: rgba(0,0,0,0.55);
    --shadow-sm: 0 0 0 0.5px rgba(0,0,0,0.5), 0 1px 2px rgba(0,0,0,0.4);
    --shadow:    0 0 0 0.5px rgba(0,0,0,0.5), 0 1px 2px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.45);
    --shadow-lg: 0 0 0 0.5px rgba(0,0,0,0.5), 0 8px 28px rgba(0,0,0,0.55);
  }
}

/* ── Reset & Grundlagen ─────────────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; background: var(--page-bg); -webkit-text-size-adjust: 100%; }
body {
  min-height: 100%;
  background: transparent;
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  font-size: 14px; line-height: 1.47; letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { text-decoration: none; color: inherit; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
/* Muss nach den Komponenten greifen: .btn & Co. setzen ein eigenes display und
   würden das UA-Verhalten von [hidden] sonst aushebeln. */
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
.mono { font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }
.ic { flex: 0 0 auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
*:focus:not(:focus-visible) { outline: none; }
::selection { background: var(--accent-tint); }

.bg-aurora {
  position: fixed; inset: -20vmax; z-index: -2; pointer-events: none;
  background:
    radial-gradient(58vmax 58vmax at 10% 0%,   var(--aurora-1), transparent 70%),
    radial-gradient(62vmax 62vmax at 95% 12%,  var(--aurora-2), transparent 72%),
    radial-gradient(60vmax 60vmax at 80% 95%,  var(--aurora-3), transparent 70%),
    radial-gradient(58vmax 58vmax at 8% 92%,   var(--aurora-4), transparent 70%),
    radial-gradient(50vmax 50vmax at 50% 45%,  var(--aurora-2), transparent 75%);
  filter: blur(44px);
  animation: auroraDrift 26s var(--ease-in-out) infinite alternate;
}
@keyframes auroraDrift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(2.5vmax,-2vmax,0) scale(1.06); }
  100% { transform: translate3d(-2vmax,2.5vmax,0) scale(1.03); }
}
@keyframes fadeInUp { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:none; } }

/* ── Sidebar (schwebendes Glas, hover-to-reveal) ────────────────────────── */
.edge-trigger { position: fixed; top:0; left:0; height:100vh; width:16px; z-index:120; cursor:pointer; }
.edge-trigger::after {
  content:''; position:absolute; left:5px; top:50%; width:5px; height:64px; transform:translateY(-50%);
  border-radius: var(--radius-full); background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-sm), inset 0 1px 0 var(--glass-highlight);
  opacity:.9; transition: opacity var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out);
}
.edge-trigger:hover::after { opacity:0; transform:translateY(-50%) translateX(-6px); }

.sidebar {
  position: fixed; top:12px; left:12px; height: calc(100vh - 24px); width: var(--sidebar-w);
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur-lg); -webkit-backdrop-filter: var(--glass-blur-lg);
  border: 0.5px solid var(--glass-border); border-radius: 26px;
  box-shadow: var(--shadow-lg), inset 0 1px 0 var(--glass-highlight);
  display:flex; flex-direction:column; overflow-y:auto; z-index:130; padding: 20px 14px 14px;
  transform: translateX(calc(-100% - 20px)); opacity:0;
  transition: transform 560ms var(--ease-spring), opacity 320ms var(--ease-out);
}
.edge-trigger:hover ~ .sidebar, .sidebar:hover, body.nav-pinned .sidebar { transform: translateX(0); opacity:1; }
.sidebar::before {
  content:''; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  background: linear-gradient(160deg, rgba(255,255,255,0.22), transparent 42%);
}
.sidebar > * { position: relative; }
.sb-brand { display:flex; align-items:center; gap:9px; padding: 0 8px 18px; }
.sb-brand svg { height: 30px; width:auto; color: var(--text); }
.sb-section { font-size:10.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  color: var(--muted); padding: 14px 12px 6px; }
.nav-item {
  display:flex; align-items:center; gap:10px; padding:8px 12px; font-size:13px; font-weight:500;
  border-radius:9px; color: var(--text-2); margin-bottom: 2px;
  transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}
.nav-item:hover { background: var(--hover-fill); color: var(--text); }
.nav-item.active { background: var(--accent); color:#fff; box-shadow: 0 1px 3px var(--accent-tint); }
.nav-badge { margin-left:auto; background: var(--fill-quaternary); color: var(--text-2);
  font-size:10px; font-weight:700; padding:1px 7px; border-radius:10px; }
.nav-item.active .nav-badge { background: rgba(255,255,255,0.25); color:#fff; }
.sb-foot { margin-top:auto; padding-top: 14px; border-top: 0.5px solid var(--separator); }
.sb-user {
  display:flex; align-items:center; gap:10px; padding: 8px 10px; border-radius: 12px; width:100%;
  background: transparent; border:none; cursor:pointer; text-align:left;
  transition: background var(--duration-fast) var(--ease-out);
}
.sb-user:hover { background: var(--hover-fill); }
.avatar {
  width:32px; height:32px; border-radius:50%; flex:0 0 auto;
  background: linear-gradient(140deg, var(--accent), var(--accent-hover));
  color:#fff; display:flex; align-items:center; justify-content:center;
  font-size:12px; font-weight:700; letter-spacing:0;
}
.avatar.lg { width:56px; height:56px; font-size:19px; }
.sb-user-name { font-size:13px; font-weight:600; line-height:1.2; }
.sb-user-mail { font-size:11px; color: var(--muted); line-height:1.3;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:140px; }

/* ── Hauptbereich ───────────────────────────────────────────────────────── */
.main-wrap { margin-left:0; transition: margin-left 560ms var(--ease-spring); min-height:100vh; display:flex; flex-direction:column; }
body.nav-pinned .main-wrap { margin-left: calc(var(--sidebar-w) + 24px); }

.topbar {
  background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 0.5px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
  min-height:56px; padding: 8px 28px; display:flex; align-items:center; gap:12px;
  position: sticky; top:0; z-index:50;
}
.topbar-title { font-size:15px; font-weight:600; letter-spacing:-.2px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.topbar-spacer { margin-left:auto; }
.page { padding: 26px 28px 40px; flex:1; width:100%; max-width: 1480px; }
.page-heading { font-size: clamp(1.5rem, 1rem + 1.6vw, 2rem); font-weight:700; letter-spacing:-.5px; line-height:1.15; }
.page-sub { color: var(--muted); font-size:13.5px; margin-top:5px; }
.page-head { display:flex; align-items:flex-end; gap:16px; flex-wrap:wrap; margin-bottom: 22px; }
.section-head { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:13px; }
.section-head h2 { font-size:16px; font-weight:650; letter-spacing:-.25px; }
.section-head .hint { font-size:12px; color:var(--muted); }
.stack { display:flex; flex-direction:column; gap:26px; }

/* Glas-Pille (Menü-Toggle, Theme-Schalter, Zurück) */
.nav-toggle {
  display:inline-flex; align-items:center; gap:7px; height:34px; padding:0 14px;
  border:0.5px solid var(--glass-border); border-radius: var(--radius-full);
  background: var(--glass-bg-strong); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-sm), inset 0 1px 0 var(--glass-highlight);
  font-size:12.5px; font-weight:600; cursor:pointer; color: var(--text);
  transition: transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}
.nav-toggle:hover { transform: translateY(-1px); box-shadow: var(--shadow), inset 0 1px 0 var(--glass-highlight); }
.nav-toggle:active { transform: scale(0.97); }
.nav-toggle.icon-only { padding:0; width:34px; justify-content:center; }

/* ── Karten ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--glass-bg); border-radius: var(--radius);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 0.5px solid var(--glass-border);
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-highlight);
}
.card-body { padding: 22px 26px; }
.card-title { font-size:12px; font-weight:600; color: var(--muted); }

.chart-box {
  background: var(--glass-bg); border-radius: var(--radius);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 0.5px solid var(--glass-border);
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-highlight);
  padding: 22px 24px; position:relative; overflow:hidden;
  transition: box-shadow var(--duration-base) var(--ease-in-out), transform var(--duration-base) var(--ease-in-out);
  animation: fadeInUp var(--duration-base) var(--ease-out) both;
}
.chart-box::before {
  content:''; position:absolute; inset:0; pointer-events:none;
  background: linear-gradient(150deg, rgba(255,255,255,0.16), transparent 40%);
}
.chart-box > * { position:relative; z-index:1; }
.chart-box.flush { padding: 0; }
.chart-box h3 { font-size:14px; font-weight:600; display:flex; align-items:center; gap:8px; }
.chart-box h3 small { font-weight:400; font-size:12px; color: var(--muted); margin-left:auto; }

/* ── KPI-Kacheln ────────────────────────────────────────────────────────── */
.kpi-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(190px,1fr)); gap:14px; }
.kpi-tile {
  background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 0.5px solid var(--glass-border); border-radius: var(--radius);
  padding:20px 22px; box-shadow: var(--shadow), inset 0 1px 0 var(--glass-highlight);
  position:relative; overflow:hidden;
  transition: transform var(--duration-base) var(--ease-in-out), box-shadow var(--duration-base) var(--ease-in-out);
  animation: fadeInUp var(--duration-base) var(--ease-out) both;
}
.kpi-tile::before { content:''; position:absolute; inset:0; pointer-events:none;
  background: linear-gradient(140deg, rgba(255,255,255,0.18), transparent 46%); }
.kpi-tile::after {
  content:''; position:absolute; top:18px; right:18px; width:9px; height:9px; border-radius:50%;
  background: var(--border); box-shadow: 0 0 0 4px rgba(255,255,255,0.18);
}
.kpi-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg), inset 0 1px 0 var(--glass-highlight); }
.kpi-tile.green::after  { background: var(--success); }
.kpi-tile.red::after    { background: var(--danger); }
.kpi-tile.yellow::after { background: var(--warning); }
.kpi-tile.blue::after   { background: var(--info); }
.kpi-tile .kpi-label { font-size:12px; color:var(--muted); font-weight:600; margin-bottom:10px; padding-right:16px; }
.kpi-tile .kpi-value { font-family:'IBM Plex Mono', ui-monospace, monospace; font-size:23px; font-weight:500; letter-spacing:-.5px; }
.kpi-tile .kpi-value .unit { font-size:13px; color: var(--muted); margin-left:3px; letter-spacing:0; }
.kpi-tile.green .kpi-value  { color: var(--success-strong); }
.kpi-tile.red .kpi-value    { color: var(--danger-strong); }
.kpi-tile.yellow .kpi-value { color: var(--warning-strong); }
.kpi-tile .kpi-sub { font-size:12px; color:var(--muted); margin-top:7px; }
.kpi-grid > *:nth-child(2) { animation-delay:40ms; }
.kpi-grid > *:nth-child(3) { animation-delay:80ms; }
.kpi-grid > *:nth-child(4) { animation-delay:120ms; }
.kpi-grid > *:nth-child(5) { animation-delay:160ms; }
.kpi-grid > *:nth-child(6) { animation-delay:200ms; }
.kpi-grid > *:nth-child(7) { animation-delay:240ms; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  padding:9px 20px; border-radius: var(--radius-full); font-size:13px; font-weight:500;
  min-height:36px; border:none; cursor:pointer; white-space:nowrap;
  transition: background var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}
.btn:active { transform: translateY(0) scale(0.98); }
.btn:disabled { opacity:.5; cursor:not-allowed; }
.btn-primary { background: var(--accent); color:#fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(29,158,117,0.3); }
.btn-success { background: var(--success); color:#fff; }
.btn-danger  { background: var(--danger);  color:#fff; }
.btn-outline { background: var(--fill-quaternary); color: var(--accent); font-weight:500; }
.btn-outline:hover { background: var(--accent-tint); }
.btn-ghost   { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--hover-fill); color: var(--text); }
.btn-glass {
  background: var(--glass-bg-strong); color: var(--text);
  border: 0.5px solid var(--glass-border);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-sm), inset 0 1px 0 var(--glass-highlight);
}
.btn-glass:hover { transform: translateY(-1px); box-shadow: var(--shadow), inset 0 1px 0 var(--glass-highlight); }
.btn-sm { padding:6px 14px; font-size:12px; min-height:30px; }
.btn-block { width:100%; }
.icon-btn {
  width:30px; height:30px; border-radius:8px; display:inline-flex; align-items:center; justify-content:center;
  border:none; background:transparent; color: var(--muted); cursor:pointer;
  transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}
.icon-btn:hover { background: var(--hover-fill); color: var(--text); }
.icon-btn.danger:hover { background: var(--danger-bg); color: var(--danger); }

/* ── Segmented Control / Pill-Switch ────────────────────────────────────── */
.view-toggle { display:inline-flex; background: var(--fill-quaternary); border-radius:9px; padding:2px; gap:2px; }
.view-toggle button, .view-toggle a {
  display:flex; align-items:center; gap:6px; padding:5px 14px; border-radius:7px;
  font-size:12px; font-weight:500; border:none; background:transparent; cursor:pointer; color: var(--text-2);
  transition: background var(--duration-base) var(--ease-out), color var(--duration-base) var(--ease-out);
}
.view-toggle button.active, .view-toggle a.active {
  background: var(--segment-active); color: var(--text); font-weight:600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 0 0 0.5px rgba(0,0,0,0.04);
}
.view-toggle .cnt { font-size:10.5px; color: var(--muted); font-family:'IBM Plex Mono', monospace; }

/* ── Badges ─────────────────────────────────────────────────────────────── */
.badge { display:inline-flex; align-items:center; gap:4px; padding:2px 10px; border-radius:20px;
  font-size:11px; font-weight:600; white-space:nowrap; }
.badge-success { background: var(--success-bg); color: var(--success-strong); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger-strong); }
.badge-warning { background: var(--warning-bg); color: var(--warning-strong); }
.badge-info    { background: var(--info-bg);    color: var(--accent); }
.badge-neutral { background: var(--fill-quaternary); color: var(--text-2); }
.badge-glass   { background: var(--glass-bg-strong); border:0.5px solid var(--glass-border);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); color: var(--text); }

/* ── Tabellen ───────────────────────────────────────────────────────────── */
.table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.data-table { width:100%; border-collapse:collapse; font-size:13px; }
.data-table th { text-align:left; padding:10px 14px; font-size:11px; font-weight:600; color:var(--muted);
  border-bottom:0.5px solid var(--border); white-space:nowrap; }
.data-table td { padding:11px 14px; border-bottom:0.5px solid var(--border-light); vertical-align:middle; }
.data-table tbody tr:last-child td { border-bottom:none; }
.data-table tbody tr { transition: background var(--duration-fast) var(--ease-out); }
.data-table tbody tr:hover { background: var(--hover-fill); }
.data-table tbody tr.clickable { cursor:pointer; }
.data-table td.mono, .data-table th.mono { font-family:'IBM Plex Mono', ui-monospace, monospace; }
.data-table td.num, .data-table th.num { text-align:right; }
.data-table .zeile-titel { font-weight:600; }
.data-table .zeile-sub { font-size:11.5px; color: var(--muted); margin-top:1px; }
.td-actions { width:1%; white-space:nowrap; text-align:right; }
.cell-icon { display:flex; align-items:center; gap:9px; }
.kat-dot {
  width:28px; height:28px; border-radius:9px; flex:0 0 auto;
  display:flex; align-items:center; justify-content:center;
  background: var(--accent-tint); color: var(--accent);
}
.kat-dot.grau { background: var(--fill-quaternary); color: var(--text-2); }

/* ── Slideover: horizontal scrollende Kartenreihe ───────────────────────── */
.slideover {
  display:flex; gap:14px; overflow-x:auto; overflow-y:hidden; padding: 4px 4px 14px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling:touch; scrollbar-width:thin;
}
.slideover::-webkit-scrollbar { height:8px; }
.slideover::-webkit-scrollbar-thumb { background: var(--fill-quaternary); border-radius:99px; }
.slideover::-webkit-scrollbar-track { background:transparent; }
.slide-card {
  flex: 0 0 296px; scroll-snap-align:start; border-radius: var(--radius);
  background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border:0.5px solid var(--glass-border);
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-highlight);
  overflow:hidden; position:relative; display:flex; flex-direction:column;
  transition: transform var(--duration-base) var(--ease-in-out), box-shadow var(--duration-base) var(--ease-in-out);
  animation: fadeInUp var(--duration-base) var(--ease-out) both;
}
.slide-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg), inset 0 1px 0 var(--glass-highlight); }
.slide-card.klein { flex-basis: 210px; }
.slide-card .sc-bild {
  height:128px; background: linear-gradient(140deg, var(--accent-tint), var(--fill-quaternary));
  background-size:cover; background-position:center; position:relative; flex:0 0 auto;
}
.slide-card .sc-bild .sc-flaggen { position:absolute; left:12px; bottom:10px; font-size:17px; letter-spacing:1px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.35)); }
.slide-card .sc-bild .sc-badge { position:absolute; right:10px; top:10px; }
.slide-card .sc-body { padding:14px 16px 15px; display:flex; flex-direction:column; gap:5px; flex:1; }
.slide-card .sc-titel { font-size:14.5px; font-weight:650; letter-spacing:-.2px; line-height:1.25; }
.slide-card .sc-meta { font-size:12px; color: var(--muted); display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.slide-card .sc-foot { margin-top:auto; padding-top:10px; display:flex; align-items:center; gap:10px;
  font-size:11.5px; color:var(--text-2); }
.slide-card .sc-foot .v { font-family:'IBM Plex Mono', monospace; }
.slide-card.neu {
  border-style:dashed; border-width:1px; background: var(--glass-bg);
  align-items:center; justify-content:center; min-height:190px; cursor:pointer; color: var(--accent); gap:8px;
}
.slide-card.neu:hover { background: var(--accent-tint); }
.slide-card.neu .plus-kreis {
  width:44px; height:44px; border-radius:50%; background: var(--accent-tint);
  display:flex; align-items:center; justify-content:center;
}
/* Ordner-Karte */
.folder-card { align-items:flex-start; }
.folder-card .fc-icon {
  width:44px; height:44px; border-radius:13px; display:flex; align-items:center; justify-content:center;
  background: var(--accent-tint); color: var(--accent); margin-bottom:11px;
}
.folder-card .fc-body { padding:16px 17px 15px; display:flex; flex-direction:column; flex:1; width:100%; }
.doc-card .fc-icon { background: var(--fill-quaternary); color: var(--text-2); }

/* ── Formulare ──────────────────────────────────────────────────────────── */
.form-row { display:flex; flex-direction:column; gap:6px; margin-bottom:14px; }
.form-row > label, .form-label { font-size:12px; color: var(--muted); font-weight:600; }
.form-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap:0 14px; }
.form-control {
  width:100%; padding:10px 14px; border:0.5px solid var(--border); border-radius: var(--radius-sm);
  font-size:13px; color: var(--text); background: var(--card-bg);
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus { outline:none; border-color: var(--accent); box-shadow: 0 0 0 3.5px var(--accent-tint); }
textarea.form-control { min-height:88px; resize:vertical; line-height:1.5; }
select.form-control {
  appearance:none; -webkit-appearance:none; padding-right:34px; cursor:pointer;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 11px center; background-size:15px;
}
.form-hint { font-size:11.5px; color: var(--muted); }
.form-err { font-size:12px; color: var(--danger-strong); }
.check-row { display:flex; align-items:flex-start; gap:9px; font-size:13px; cursor:pointer; padding:7px 0; }
.check-row input[type=checkbox], .check-row input[type=radio] { width:17px; height:17px; margin-top:1px;
  accent-color: var(--accent); cursor:pointer; flex:0 0 auto; }

/* Dateiablage */
.dropzone {
  border:1px dashed var(--border); border-radius: var(--radius-sm); padding:20px 16px; text-align:center;
  color: var(--muted); font-size:12.5px; cursor:pointer; background: var(--fill-quaternary);
  transition: border-color var(--duration-fast), background var(--duration-fast), color var(--duration-fast);
}
.dropzone:hover, .dropzone.ueber { border-color: var(--accent); background: var(--accent-tint); color: var(--accent); }
.dropzone input[type=file] { display:none; }
.datei-liste { display:flex; flex-direction:column; gap:6px; margin-top:9px; }
.datei-chip {
  display:flex; align-items:center; gap:8px; font-size:12px; padding:6px 10px;
  background: var(--fill-quaternary); border-radius:8px; color: var(--text-2);
}
.datei-chip .nm { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.datei-chip .sz { margin-left:auto; font-family:'IBM Plex Mono', monospace; font-size:10.5px; color: var(--muted); }

/* ── Modal ──────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position:fixed; inset:0; z-index:200; background: rgba(0,0,0,0.32);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display:flex; align-items:center; justify-content:center; padding:20px;
  opacity:0; pointer-events:none; transition: opacity var(--duration-base) var(--ease-out);
}
.modal-backdrop.offen { opacity:1; pointer-events:auto; }
.modal {
  width:100%; max-width:560px; max-height: calc(100vh - 40px); display:flex; flex-direction:column;
  background: var(--glass-bg-strong); border-radius: var(--radius-lg);
  backdrop-filter: var(--glass-blur-lg); -webkit-backdrop-filter: var(--glass-blur-lg);
  border:0.5px solid var(--glass-border);
  box-shadow: var(--shadow-lg), inset 0 1px 0 var(--glass-highlight);
  transform: translateY(16px) scale(.98); opacity:0;
  transition: transform var(--duration-base) var(--ease-spring), opacity var(--duration-base) var(--ease-out);
}
.modal-backdrop.offen .modal { transform:none; opacity:1; }
.modal.breit { max-width:720px; }
.modal-head { display:flex; align-items:center; gap:12px; padding:18px 22px 14px; border-bottom:0.5px solid var(--separator); }
.modal-head h3 { font-size:16px; font-weight:650; letter-spacing:-.25px; }
.modal-head .icon-btn { margin-left:auto; }
.modal-body { padding:18px 22px; overflow-y:auto; flex:1; }
.modal-foot { display:flex; gap:9px; justify-content:flex-end; padding:14px 22px 18px;
  border-top:0.5px solid var(--separator); flex-wrap:wrap; }
body.modal-offen { overflow:hidden; }

/* ── Alerts & Leerzustände ──────────────────────────────────────────────── */
.alert-item {
  border-radius:12px; padding:13px 17px; border-left:3px solid; display:flex; flex-direction:column; gap:3px;
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 var(--glass-highlight); margin-bottom:10px;
}
.alert-item.danger  { background: var(--danger-bg);  border-color: var(--danger); }
.alert-item.warning { background: var(--warning-bg); border-color: var(--warning); }
.alert-item.info    { background: var(--info-bg);    border-color: var(--info); }
.alert-item.success { background: var(--success-bg); border-color: var(--success); }
.alert-item .a-title { font-weight:600; font-size:13px; }
.alert-item .a-msg   { font-size:12px; color: var(--text-2); }

.leer { text-align:center; padding:46px 22px; color: var(--muted); }
.leer .leer-icon {
  width:52px; height:52px; border-radius:16px; margin:0 auto 13px;
  background: var(--fill-quaternary); display:flex; align-items:center; justify-content:center; color: var(--muted);
}
.leer h4 { font-size:14px; font-weight:600; color: var(--text); margin-bottom:4px; }
.leer p { font-size:12.5px; max-width:340px; margin:0 auto; }

/* ── Toast ──────────────────────────────────────────────────────────────── */
.toast-wrap { position:fixed; left:50%; bottom:26px; transform:translateX(-50%); z-index:300;
  display:flex; flex-direction:column; gap:8px; align-items:center; pointer-events:none; }
.toast {
  display:flex; align-items:center; gap:9px; padding:10px 18px; border-radius: var(--radius-full);
  background: var(--glass-bg-strong); backdrop-filter: var(--glass-blur-lg); -webkit-backdrop-filter: var(--glass-blur-lg);
  border:0.5px solid var(--glass-border); box-shadow: var(--shadow-lg), inset 0 1px 0 var(--glass-highlight);
  font-size:13px; font-weight:500; animation: toastIn var(--duration-base) var(--ease-spring);
}
.toast.err { color: var(--danger-strong); }
.toast.ok  { color: var(--success-strong); }
@keyframes toastIn { from { opacity:0; transform:translateY(14px) scale(.96); } to { opacity:1; transform:none; } }

/* ── Karten (Leaflet) ───────────────────────────────────────────────────── */
.karte { width:100%; border-radius: var(--radius); overflow:hidden; background: var(--fill-quaternary); }
.karte.welt   { height: 460px; }
.karte.detail { height: 520px; }
.leaflet-container { background: transparent !important; font: inherit !important; outline:none; }
.leaflet-control-attribution {
  background: var(--glass-bg-strong) !important; backdrop-filter: var(--glass-blur);
  color: var(--muted) !important; font-size:9.5px !important; border-radius: 8px 0 0 0; border:none !important;
}
.leaflet-control-attribution a { color: var(--text-2) !important; }
.leaflet-bar, .leaflet-control-zoom {
  border:0.5px solid var(--glass-border) !important; border-radius: 12px !important; overflow:hidden;
  box-shadow: var(--shadow) !important;
}
.leaflet-bar a {
  background: var(--glass-bg-strong) !important; color: var(--text) !important;
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border-bottom-color: var(--separator) !important; font-weight:400 !important;
}
.leaflet-bar a:hover { background: var(--card-glass) !important; }
.leaflet-popup-content-wrapper {
  background: var(--glass-bg-strong) !important; color: var(--text) !important;
  backdrop-filter: var(--glass-blur-lg); -webkit-backdrop-filter: var(--glass-blur-lg);
  border:0.5px solid var(--glass-border); border-radius: var(--radius) !important;
  box-shadow: var(--shadow-lg) !important;
}
.leaflet-popup-content { margin:13px 16px !important; font-size:13px !important; line-height:1.45 !important; }
.leaflet-popup-tip { background: var(--glass-bg-strong) !important; box-shadow:none !important; }
.leaflet-popup-close-button { color: var(--muted) !important; }
.pop-titel { font-weight:650; font-size:13.5px; margin-bottom:2px; }
.pop-meta { font-size:11.5px; color: var(--muted); }

/* Kartenpins */
.pin-wrap { background:none !important; border:none !important; }
.pin {
  width:34px; height:34px; border-radius:50% 50% 50% 6px; transform: rotate(-45deg);
  background: var(--accent); color:#fff; display:flex; align-items:center; justify-content:center;
  box-shadow: 0 3px 9px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.35);
  border: 1.5px solid rgba(255,255,255,.9);
}
.pin > svg { transform: rotate(45deg); }
.pin.hotel { background:#7850ff; }
.pin.heim  { background: var(--text-2); }
.pin.nr {
  position:absolute; top:-5px; right:-5px; width:17px; height:17px; border-radius:50%;
  background: var(--card-bg); color: var(--text); font-size:9.5px; font-weight:700;
  display:flex; align-items:center; justify-content:center; transform:none;
  box-shadow: var(--shadow-sm); border:0.5px solid var(--border);
}
.pin-auto {
  width:42px; height:42px; border-radius:50%; background: var(--card-bg); color: var(--accent);
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 4px 14px rgba(0,0,0,.28), 0 0 0 3px var(--accent-tint);
  border:1.5px solid var(--accent); animation: pulseAuto 2.4s var(--ease-in-out) infinite;
}
@keyframes pulseAuto {
  0%,100% { box-shadow: 0 4px 14px rgba(0,0,0,.28), 0 0 0 3px var(--accent-tint); }
  50%     { box-shadow: 0 4px 14px rgba(0,0,0,.28), 0 0 0 11px rgba(29,158,117,0); }
}
.karte-legende {
  display:flex; gap:14px; flex-wrap:wrap; align-items:center; font-size:11.5px; color: var(--muted);
  padding:11px 16px 0;
}
.karte-legende .lg { display:flex; align-items:center; gap:6px; }
.karte-legende .sw { width:11px; height:11px; border-radius:3px; }

/* ── Hero: Titelbild als Bühne, Inhalt als Glas darüber ─────────────────── */
.hero {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  min-height: 260px; display: flex; flex-direction: column; justify-content: space-between;
  background-size: cover; background-position: center;
  box-shadow: var(--shadow-lg); margin-bottom: 22px;
  animation: fadeInUp var(--duration-base) var(--ease-out) both;
}
/* Zwei Verläufe: unten dunkel für die Schrift, oben leicht für die Pillen. */
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.45) 34%, rgba(0,0,0,0.05) 62%, rgba(0,0,0,0.28) 100%);
}
.hero > * { position: relative; z-index: 1; }
.hero-inner { padding: 26px 28px 24px; color: #fff; }
.hero-inner .page-heading { color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,0.4); }
.hero-inner .page-sub { color: rgba(255,255,255,0.9); text-shadow: 0 1px 10px rgba(0,0,0,0.5); }
/* Im Textfluss statt absolut: So können die Pillen umbrechen, ohne die
   Überschrift darunter zu überdecken. */
.hero-oben {
  padding: 16px 18px 0; z-index: 2;
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.hero .badge-glass { background: rgba(255,255,255,0.22); border-color: rgba(255,255,255,0.35); color: #fff; }
.hero-hoch { min-height: 340px; }

/* Kennzahlen auf dem Bild – dunkles Glas, damit sie überall lesbar bleiben. */
.hero-kpis { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.hero-kpi {
  background: rgba(255,255,255,0.16); border: 0.5px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-radius: 14px; padding: 9px 14px; min-width: 92px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}
.hero-kpi .k { font-size: 10.5px; font-weight: 600; color: rgba(255,255,255,0.78);
  text-transform: uppercase; letter-spacing: .05em; }
.hero-kpi .v { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 17px;
  font-weight: 500; letter-spacing: -.4px; margin-top: 2px; }
.hero-kpi .v small { font-size: 11px; opacity: .75; margin-left: 2px; }
.hero-kpi .s { font-size: 10.5px; color: rgba(255,255,255,0.72); margin-top: 1px; }

/* ── Karte mit aufgesetzten Kacheln ─────────────────────────────────────── */
.karte-buehne { position: relative; border-radius: var(--radius); overflow: hidden; }
.karte-buehne .karte { border-radius: 0; }
.karte-overlay {
  position: absolute; left: 0; right: 0; z-index: 500; pointer-events: none;
  display: flex; gap: 10px; padding: 14px 16px;
}
.karte-overlay.oben { top: 0; flex-wrap: wrap; }
.karte-overlay.unten {
  bottom: 0; overflow-x: auto; scroll-snap-type: x proximity;
  pointer-events: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.karte-overlay.unten::-webkit-scrollbar { display: none; }
/* Zoom-Bedienelemente aus dem Weg der Kacheln schieben */
.karte-buehne .leaflet-top.leaflet-left { margin-top: 84px; }

.glass-kachel {
  background: rgba(28,28,30,0.55); color: #fff;
  border: 0.5px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 15px; padding: 10px 14px; min-width: 118px; flex: 0 0 auto;
  box-shadow: 0 6px 22px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.16);
}
.glass-kachel .k { font-size: 10.5px; font-weight: 600; color: rgba(255,255,255,0.72);
  display: flex; align-items: center; gap: 5px; }
.glass-kachel .v { font-size: 14.5px; font-weight: 600; letter-spacing: -.2px; margin-top: 3px; }
.glass-kachel .v .mono { font-family: 'IBM Plex Mono', monospace; font-weight: 500; }
.glass-kachel .s { font-size: 11px; color: rgba(255,255,255,0.66); margin-top: 1px; }

/* Stop-Karten, die über dem unteren Kartenrand liegen */
.stop-karte {
  scroll-snap-align: start; min-width: 208px; max-width: 232px; cursor: pointer;
  display: flex; align-items: flex-start; gap: 10px;
  transition: transform var(--duration-fast) var(--ease-out);
}
.stop-karte:hover { transform: translateY(-2px); }
.stop-karte.aktiv { border-color: var(--accent); box-shadow: 0 6px 22px rgba(0,0,0,0.3), 0 0 0 1.5px var(--accent); }
.stop-karte .nr {
  width: 26px; height: 26px; border-radius: 9px; flex: 0 0 auto;
  background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center;
}
.stop-karte .txt { min-width: 0; }
.stop-karte .titel { font-size: 13px; font-weight: 600; line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.stop-karte .meta { font-size: 11px; color: rgba(255,255,255,0.68); margin-top: 2px;
  display: flex; align-items: center; gap: 5px; }
.stop-karte .meta .mono { font-family: 'IBM Plex Mono', monospace; }

/* ── Tagesauswahl ───────────────────────────────────────────────────────── */
.tag-leiste {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px;
  scroll-snap-type: x proximity; scrollbar-width: none;
}
.tag-leiste::-webkit-scrollbar { display: none; }
.tag-pille {
  flex: 0 0 auto; scroll-snap-align: start; min-width: 58px; text-align: center;
  padding: 9px 6px 8px; border-radius: 18px; cursor: pointer;
  background: var(--glass-bg); border: 0.5px solid var(--glass-border);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-sm), inset 0 1px 0 var(--glass-highlight);
  transition: background var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
}
.tag-pille:hover { transform: translateY(-1px); }
.tag-pille .z { font-family: 'IBM Plex Mono', monospace; font-size: 17px; font-weight: 500; line-height: 1.1; }
.tag-pille .w { font-size: 10.5px; color: var(--muted); font-weight: 600; margin-top: 1px; }
.tag-pille .p { display: block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); margin: 4px auto 0; opacity: 0; }
.tag-pille.hat-stops .p { opacity: 1; }
.tag-pille.aktiv { background: var(--accent); border-color: transparent; color: #fff; }
.tag-pille.aktiv .w { color: rgba(255,255,255,0.85); }
.tag-pille.aktiv .p { background: #fff; }
.tag-pille.heute:not(.aktiv) { border-color: var(--accent); }

/* ── Zeitstrahl des Tages ───────────────────────────────────────────────── */
.zeitstrahl { position: relative; padding-left: 30px; }
.zeitstrahl::before {
  content: ''; position: absolute; left: 9px; top: 12px; bottom: 12px; width: 1.5px;
  background: linear-gradient(var(--accent), var(--border-light));
}
.zs-punkt { position: relative; padding: 0 0 16px; }
.zs-punkt::before {
  content: ''; position: absolute; left: -25px; top: 15px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--card-bg); border: 2px solid var(--accent);
}
.zs-punkt.vorbei::before { background: var(--accent); }
.zs-punkt.vorbei { opacity: .6; }
.zs-punkt.jetzt::before { box-shadow: 0 0 0 4px var(--accent-tint); }
.zs-punkt:last-child { padding-bottom: 0; }
.zs-karte {
  display: flex; align-items: center; gap: 12px; padding: 12px 15px;
  background: var(--glass-bg); border: 0.5px solid var(--glass-border); border-radius: 14px;
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-sm), inset 0 1px 0 var(--glass-highlight);
  transition: transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}
.zs-karte:hover { transform: translateX(2px); box-shadow: var(--shadow), inset 0 1px 0 var(--glass-highlight); }
.zs-zeit { font-family: 'IBM Plex Mono', monospace; font-size: 13px; font-weight: 500;
  color: var(--accent); min-width: 46px; flex: 0 0 auto; white-space: nowrap; }
.zs-punkt.vorbei .zs-zeit { color: var(--muted); }
.zs-titel { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.zs-meta { font-size: 11.5px; color: var(--muted); margin-top: 1px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ── Stundenwetter ──────────────────────────────────────────────────────── */
.wetter-reihe { display: flex; gap: 6px; overflow-x: auto; padding-top: 4px; scrollbar-width: none; }
.wetter-reihe::-webkit-scrollbar { display: none; }
.wetter-stunde {
  flex: 0 0 auto; min-width: 54px; text-align: center; padding: 9px 4px;
  border-radius: 13px; background: var(--fill-quaternary);
}
.wetter-stunde .h { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.wetter-stunde .i { color: var(--accent); margin: 4px 0 2px; }
.wetter-stunde .t { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; font-weight: 500; }
.wetter-stunde .r { font-size: 9.5px; color: var(--info); }

/* ── Sonstiges ──────────────────────────────────────────────────────────── */
.chip-row { display:flex; gap:7px; flex-wrap:wrap; }
.tag {
  display:inline-flex; align-items:center; gap:5px; padding:4px 11px; border-radius: var(--radius-full);
  background: var(--fill-quaternary); font-size:11.5px; color: var(--text-2); font-weight:500;
}
.trenner { height:0.5px; background: var(--separator); margin: 4px 0; border:none; }
.zwei-spalten { display:grid; grid-template-columns: 1.55fr 1fr; gap:20px; align-items:start; }
.info-liste { display:flex; flex-direction:column; }
.info-liste .zeile { display:flex; gap:14px; padding:10px 0; border-bottom:0.5px solid var(--border-light); font-size:13px; }
.info-liste .zeile:last-child { border-bottom:none; }
.info-liste .k { color: var(--muted); flex:0 0 40%; font-size:12.5px; }
.info-liste .v { font-weight:500; flex:1; }
.text-muted { color: var(--muted); }
.text-sm { font-size:12px; }
.nowrap { white-space:nowrap; }
.mt-2 { margin-top:8px; } .mt-4 { margin-top:16px; } .mt-6 { margin-top:24px; }
.mb-2 { margin-bottom:8px; } .mb-4 { margin-bottom:16px; }
.flex { display:flex; align-items:center; gap:10px; }
.flex-wrap { flex-wrap:wrap; }
.ml-auto { margin-left:auto; }
.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; }

/* Mobile Tab-Leiste */
.tabbar { display:none; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .zwei-spalten { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .edge-trigger { display:none; }
  body.nav-pinned .main-wrap { margin-left:0; }
  .sidebar {
    top:0; left:0; height:100vh; width: min(300px, 84vw); border-radius:0 26px 26px 0;
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    transform: translateX(-102%); opacity:1; z-index:150;
  }
  /* Auf dem Handy zählt allein nav-offen. Hover und das am Desktop gemerkte
     nav-pinned dürfen die Schublade hier nicht aufziehen. */
  .sidebar:hover,
  body.nav-pinned .sidebar,
  .edge-trigger:hover ~ .sidebar { transform: translateX(-102%); }
  body.nav-offen .sidebar,
  body.nav-offen.nav-pinned .sidebar { transform: translateX(0); }
  /* Die Tab-Leiste würde sonst über der Schublade liegen und das Benutzerfeld
     verdecken – solange die Schublade offen ist, tritt sie zurück. */
  body.nav-offen .tabbar { opacity:0; pointer-events:none; }
  .tabbar { transition: opacity var(--duration-base) var(--ease-out); }
  .sb-schatten {
    position:fixed; inset:0; z-index:125; background:rgba(0,0,0,.34);
    backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
    opacity:0; pointer-events:none; transition: opacity var(--duration-base) var(--ease-out);
  }
  body.nav-offen .sb-schatten { opacity:1; pointer-events:auto; }

  /* Auf schmalen Geräten reicht das Symbol – so bleibt Platz für den Seitentitel. */
  .topbar { padding: 8px 14px; gap:8px; }
  .topbar .nav-toggle { padding:0; width:34px; justify-content:center; }
  .topbar .nav-toggle-text { display:none; }
  .page { padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); }
  .card-body { padding: 18px 17px; }
  .chart-box { padding: 18px 17px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap:11px; }
  .kpi-tile { padding:15px 16px; }
  .kpi-tile .kpi-value { font-size:20px; }
  .kpi-tile .kpi-label { font-size:11.5px; margin-bottom:7px; }
  .kpi-tile::after { top:14px; right:14px; width:8px; height:8px; }
  .karte.welt { height: 330px; }
  .karte.detail { height: 400px; }
  .hero { min-height: 210px; border-radius: var(--radius); }
  .hero-hoch { min-height: 260px; }
  .hero-inner { padding: 18px 18px 18px; }
  .hero-kpi { min-width: 78px; padding: 8px 11px; }
  .hero-kpi .v { font-size: 15px; }
  .karte-overlay { padding: 10px 12px; gap: 8px; }
  .glass-kachel { min-width: 104px; padding: 8px 11px; border-radius: 13px; }
  .glass-kachel .v { font-size: 13px; }
  .stop-karte { min-width: 176px; }
  .karte-buehne .leaflet-top.leaflet-left { margin-top: 62px; }
  .slide-card { flex-basis: 258px; }
  .slideover { padding-left:16px; padding-right:16px; margin-left:-16px; margin-right:-16px; }
  .modal { max-width:none; max-height: calc(100vh - 24px); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .modal-backdrop { padding:0; align-items:flex-end; }
  .modal-backdrop.offen .modal { transform:none; }
  .modal { transform: translateY(100%); }
  .modal-foot { padding-bottom: max(18px, env(safe-area-inset-bottom)); }
  .modal-foot .btn { flex:1; }
  .toast-wrap { bottom: calc(84px + env(safe-area-inset-bottom)); }

  /* Untere Tab-Leiste als Haupt-Navigation */
  .tabbar {
    display:flex; position:fixed; z-index:140;
    left:12px; right:12px; bottom: max(12px, env(safe-area-inset-bottom));
    background: var(--glass-bg-strong); border:0.5px solid var(--glass-border);
    backdrop-filter: var(--glass-blur-lg); -webkit-backdrop-filter: var(--glass-blur-lg);
    box-shadow: var(--shadow-lg), inset 0 1px 0 var(--glass-highlight);
    border-radius: var(--radius-full); padding:6px; gap:2px;
  }
  .tabbar a {
    flex:1; display:flex; flex-direction:column; align-items:center; gap:2px; padding:7px 2px;
    border-radius: var(--radius-full); font-size:10px; font-weight:600; color: var(--muted);
    transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
  }
  .tabbar a.active { background: var(--accent); color:#fff; }
  .data-table { font-size:12.5px; }
  .data-table th, .data-table td { padding:9px 11px; }
  .page-heading { font-size: 1.45rem; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .slide-card { flex-basis: min(78vw, 270px); }
  .form-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration:.001ms !important; transition-duration:.001ms !important; }
  .bg-aurora { animation:none; }
}
@media print {
  .sidebar, .topbar, .tabbar, .edge-trigger, .bg-aurora { display:none !important; }
  .main-wrap { margin:0 !important; }
  .card, .chart-box, .kpi-tile { box-shadow:none; border:0.5px solid #ccc; backdrop-filter:none; }
}
