/* ============================================================
   styles.css — Osnabrück fährt · Design System
   Apple-inspired, Notion-clean, civic-trustworthy
   ============================================================ */

/* — Fonts —————————————————————————————————————————————————— */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* — Tokens ————————————————————————————————————————————————— */
:root {
  /* Surfaces */
  --bg:        #F5F5F7;
  --surface:   #FFFFFF;
  --surface-2: #FAFAFA;
  --overlay:   rgba(0,0,0,0.45);

  /* Borders */
  --border:        #E0E0E5;
  --border-subtle: #EBEBF0;

  /* Text */
  --text-1: #1D1D1F;
  --text-2: #6E6E73;
  --text-3: #8E8E93;

  /* Brand */
  --blue:         #0071E3;
  --blue-hover:   #0077ED;
  --blue-light:   #EBF4FF;
  --blue-border:  #B8D9FF;

  /* Semantic */
  --green:        #34C759;
  --green-light:  #ECFDF5;
  --green-border: #86DFA8;
  --orange:       #FF9F0A;
  --orange-light: #FFF8EC;
  --orange-border:#FFD68A;
  --red:          #FF3B30;
  --red-light:    #FFF1F0;
  --red-border:   #FFB0AD;
  --purple:       #BF5AF2;
  --purple-light: #F5EEFF;
  --teal:         #5AC8FA;
  --teal-light:   #E5F8FF;

  /* Layout */
  --nav-h:       64px;
  --sidebar-w:   300px;
  --panel-w:     380px;
  --content-max: 1200px;

  /* Radius */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl:28px;

  /* Shadows */
  --sh-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --sh-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --sh-lg: 0 12px 32px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.05);
  --sh-xl: 0 24px 48px rgba(0,0,0,0.12), 0 8px 16px rgba(0,0,0,0.06);

  /* Motion */
  --t-fast:   150ms ease;
  --t:        200ms ease;
  --t-slow:   300ms ease;
}

/* — Reset ——————————————————————————————————————————————————— */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, 'Inter', BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-1);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* — Page fade-in ——————————————————————————————————————————— */
body { animation: fadeIn 250ms ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================
   NAVIGATION
   ============================================================ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex; align-items: center;
}
.navbar-inner {
  width: 100%; max-width: var(--content-max);
  margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 0;
}
.navbar-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit;
  flex-shrink: 0;
}
.navbar-logo:hover { text-decoration: none; }
.logo-icon { display: flex; align-items: center; }
.logo-text {
  font-size: 17px; font-weight: 600; color: var(--text-1);
  letter-spacing: -0.02em;
}
.logo-text span { color: var(--blue); }

.navbar-links {
  display: flex; align-items: center; gap: 4px;
  margin: 0 auto; /* center */
}
.navbar-links a {
  padding: 7px 14px;
  border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500;
  color: var(--text-2);
  transition: color var(--t), background var(--t);
  text-decoration: none;
}
.navbar-links a:hover { color: var(--text-1); background: var(--bg); }
.navbar-links a.active { color: var(--blue); background: var(--blue-light); }

.navbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px;
  border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500;
  border: none;
  transition: all var(--t);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
  background: var(--blue); color: #fff;
}
.btn-primary:hover { background: var(--blue-hover); color: #fff; box-shadow: 0 4px 12px rgba(0,113,227,0.3); }

.btn-secondary {
  background: var(--surface); color: var(--text-1);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: #c0c0c8; background: var(--bg); color: var(--text-1); }

.btn-ghost {
  background: transparent; color: var(--text-2);
}
.btn-ghost:hover { background: var(--bg); color: var(--text-1); }

.btn-danger {
  background: var(--red); color: #fff;
}
.btn-danger:hover { background: #e5342a; }

.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-lg { padding: 12px 28px; font-size: 16px; border-radius: var(--r-md); }

/* ============================================================
   BADGES / PILLS
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
}
.badge svg { width: 10px; height: 10px; }

.badge-orange { color: #B25000; background: var(--orange-light); border-color: var(--orange-border); }
.badge-blue   { color: #005CBD; background: var(--blue-light);   border-color: var(--blue-border); }
.badge-green  { color: #1A7E3E; background: var(--green-light);  border-color: var(--green-border); }
.badge-gray   { color: var(--text-2); background: var(--bg);     border-color: var(--border); }
.badge-red    { color: #B5231A; background: var(--red-light);    border-color: var(--red-border); }
.badge-purple { color: #7B2EB8; background: var(--purple-light); border-color: #C9A3F4; }

/* Priority dot */
.priority-dot {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 500;
}
.priority-dot::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.priority-dot.hoch   ::before, .priority-dot.hoch::before    { background: var(--red); }
.priority-dot.mittel ::before, .priority-dot.mittel::before   { background: var(--orange); }
.priority-dot.niedrig::before, .priority-dot.niedrig::before  { background: var(--green); }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: var(--sh-sm);
  overflow: hidden;
}
.card-hover {
  transition: transform var(--t), box-shadow var(--t);
  cursor: pointer;
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.page-wrap {
  padding-top: var(--nav-h);
  min-height: 100vh;
}
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.flex   { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center  { display: flex; align-items: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

/* ============================================================
   TYPOGRAPHY HELPERS
   ============================================================ */
.heading-xl { font-size: 48px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.heading-lg { font-size: 32px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; }
.heading-md { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; }
.heading-sm { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.text-sm    { font-size: 13px; }
.text-xs    { font-size: 12px; }
.text-muted { color: var(--text-2); }
.text-subtle { color: var(--text-3); }

/* ============================================================
   HERO (HOME PAGE)
   ============================================================ */
.hero {
  padding: 72px 0 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 100% 80% at 50% -10%, rgba(0,113,227,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px;
  background: var(--blue-light);
  border: 1px solid var(--blue-border);
  border-radius: 100px;
  font-size: 13px; font-weight: 500;
  color: var(--blue);
  margin-bottom: 20px;
}
.hero-title {
  font-size: 52px; font-weight: 700;
  letter-spacing: -0.035em; line-height: 1.05;
  color: var(--text-1);
  margin-bottom: 16px;
  max-width: 720px; margin-left: auto; margin-right: auto;
}
.hero-title em { font-style: normal; color: var(--blue); }
.hero-subtitle {
  font-size: 18px; color: var(--text-2); line-height: 1.6;
  max-width: 520px; margin: 0 auto 32px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-trust {
  margin-top: 20px;
  font-size: 13px; color: var(--text-3);
  display: flex; align-items: center; gap: 16px; justify-content: center;
}
.hero-trust-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--border); }

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: var(--sh-sm);
  padding: 24px;
}
.stat-card-icon {
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.stat-card-icon svg { width: 20px; height: 20px; }
.stat-card-value {
  font-size: 36px; font-weight: 700;
  letter-spacing: -0.03em; line-height: 1;
  margin-bottom: 4px;
}
.stat-card-label {
  font-size: 14px; color: var(--text-2); font-weight: 500;
  margin-bottom: 12px;
}
.stat-card-trend {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
}
.trend-up   { color: #1A7E3E; background: var(--green-light); }
.trend-down { color: #B5231A; background: var(--red-light); }
.trend-neutral { color: var(--text-2); background: var(--bg); }

/* ============================================================
   REPORTS TABLE
   ============================================================ */
.table-wrap {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: var(--sh-sm);
  overflow: hidden;
}
.table-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.table-header-left { display: flex; align-items: center; gap: 12px; }
.table-title { font-size: 16px; font-weight: 600; }
.table-count {
  font-size: 13px; font-weight: 500;
  color: var(--text-2);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 2px 10px;
}

.filter-bar {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.search-input-wrap {
  position: relative; flex: 1; min-width: 200px;
}
.search-input-wrap svg {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--text-3);
}
.search-input {
  width: 100%; padding: 7px 10px 7px 32px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13px; color: var(--text-1);
  background: var(--bg);
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}
.search-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,113,227,0.12);
  background: var(--surface);
}
.filter-select {
  padding: 7px 30px 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13px; color: var(--text-1);
  background: var(--bg);
  outline: none; cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%236E6E73' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color var(--t);
}
.filter-select:focus { border-color: var(--blue); outline: none; }

table { width: 100%; border-collapse: collapse; }
thead tr { border-bottom: 1px solid var(--border-subtle); }
th {
  text-align: left;
  padding: 10px 14px;
  font-size: 12px; font-weight: 600;
  color: var(--text-2); text-transform: uppercase;
  letter-spacing: 0.05em; white-space: nowrap;
  cursor: pointer; user-select: none;
}
th:hover { color: var(--text-1); }
th svg { width: 12px; height: 12px; display: inline; margin-left: 4px; }
tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--t-fast);
  cursor: pointer;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg); }
td {
  padding: 12px 14px;
  font-size: 13.5px;
  vertical-align: middle;
}
.td-id    { font-weight: 600; font-family: 'SF Mono', 'Fira Code', monospace; font-size: 12px; color: var(--text-2); }
.td-loc   { font-weight: 500; color: var(--text-1); }
.td-loc small { display: block; font-size: 12px; color: var(--text-3); font-weight: 400; }
.td-date  { white-space: nowrap; color: var(--text-2); font-size: 13px; }

/* ============================================================
   PILL FILTERS
   ============================================================ */
.pill-group { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 13px; font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2);
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
}
.pill:hover { border-color: #b0b0ba; color: var(--text-1); }
.pill.active {
  background: var(--blue); color: #fff;
  border-color: var(--blue);
}

/* Category pills color variants */
.pill.cat-fahrbahn.active      { background: var(--red); border-color: var(--red); }
.pill.cat-beleuchtung.active   { background: var(--orange); border-color: var(--orange); }
.pill.cat-beschilderung.active { background: var(--blue); border-color: var(--blue); }
.pill.cat-hindernisse.active   { background: var(--purple); border-color: var(--purple); }
.pill.cat-markierungen.active  { background: var(--green); border-color: var(--green); }
.pill.cat-infrastruktur.active { background: var(--teal); border-color: var(--teal); }

/* ============================================================
   MAP PAGE
   ============================================================ */
.map-page {
  display: flex;
  height: calc(100vh - var(--nav-h));
  margin-top: var(--nav-h);
  overflow: hidden;
}

/* Sidebar */
.map-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 10;
  transition: transform var(--t-slow);
}
.sidebar-top {
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.sidebar-title {
  font-size: 15px; font-weight: 600; margin-bottom: 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.sidebar-search {
  position: relative;
}
.sidebar-search svg {
  position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; color: var(--text-3);
}
.sidebar-search input {
  width: 100%; padding: 7px 9px 7px 30px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13px;
  outline: none;
  background: var(--bg);
  transition: border-color var(--t), box-shadow var(--t);
}
.sidebar-search input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,113,227,0.1);
  background: #fff;
}
.sidebar-filters {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.filter-label { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 7px; }

.report-list { overflow-y: auto; flex: 1; }
.report-list-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background var(--t-fast);
  position: relative;
}
.report-list-item:hover { background: var(--bg); }
.report-list-item.active { background: var(--blue-light); }
.report-list-item.active::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--blue);
  border-radius: 0 var(--r-xs) var(--r-xs) 0;
}
.rli-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.rli-id { font-size: 11px; font-family: 'SF Mono', 'Fira Code', monospace; color: var(--text-3); font-weight: 500; }
.rli-loc { font-size: 13px; font-weight: 500; color: var(--text-1); line-height: 1.3; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rli-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* Map area */
#map {
  flex: 1;
  min-width: 0;
}

/* Custom Leaflet tile style */
.leaflet-container {
  font-family: inherit !important;
}

/* Detail Panel */
.detail-panel {
  width: var(--panel-w);
  flex-shrink: 0;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow: hidden; z-index: 10;
  transform: translateX(100%);
  transition: transform var(--t-slow);
  position: absolute; right: 0; top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  box-shadow: var(--sh-xl);
}
.detail-panel.open { transform: translateX(0); }

.panel-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.panel-header-id {
  font-size: 13px; font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--text-3); font-weight: 500;
}
.panel-close-btn {
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  background: var(--bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-2);
  transition: all var(--t-fast);
}
.panel-close-btn:hover { background: var(--red-light); color: var(--red); border-color: var(--red-border); }

.panel-body { overflow-y: auto; flex: 1; padding: 18px; }

.panel-section { margin-bottom: 22px; }
.panel-section-title {
  font-size: 11px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.07em;
  margin-bottom: 8px;
}
.panel-field {
  font-size: 14px; color: var(--text-1); line-height: 1.5;
}
.panel-field strong { color: var(--text-1); font-weight: 600; }

.panel-location-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-sm); font-size: 13px;
  color: var(--text-1); cursor: pointer;
  transition: all var(--t-fast);
  font-family: inherit;
  width: 100%; text-align: left;
}
.panel-location-btn:hover { border-color: var(--blue); color: var(--blue); }
.panel-location-btn svg { width: 14px; height: 14px; color: var(--text-3); flex-shrink: 0; }

/* Status timeline */
.timeline { list-style: none; position: relative; padding-left: 20px; }
.timeline::before {
  content: ''; position: absolute; left: 7px; top: 6px; bottom: 0;
  width: 1px; background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 14px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
  position: absolute; left: -20px; top: 4px;
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--border);
}
.timeline-dot.submit { background: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.timeline-dot.update { background: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.timeline-dot.answer { background: var(--green); box-shadow: 0 0 0 1px var(--green); }
.timeline-dot.close  { background: var(--text-3); box-shadow: 0 0 0 1px var(--text-3); }
.timeline-dot.auto   { background: var(--border); box-shadow: 0 0 0 1px var(--border); }
.timeline-date { font-size: 11px; color: var(--text-3); margin-bottom: 1px; }
.timeline-event { font-size: 13px; color: var(--text-1); line-height: 1.4; }

/* Map custom markers */
.map-marker-wrap { position: relative; }
.map-marker {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px; font-weight: 700;
  border: 2.5px solid rgba(255,255,255,0.9);
  box-shadow: 0 2px 10px rgba(0,0,0,0.22), 0 1px 3px rgba(0,0,0,0.12);
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
  position: relative;
}
.map-marker:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 16px rgba(0,0,0,0.28);
  z-index: 999;
}
.map-marker.resolved { opacity: 0.45; }
.map-marker.pulse::after {
  content: '';
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 2px solid currentColor;
  animation: markerPulse 2.5s ease-out infinite;
  opacity: 0.5;
}
@keyframes markerPulse {
  0% { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* Cluster icon */
.cluster-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  border: 3px solid rgba(255,255,255,0.9);
  box-shadow: 0 2px 12px rgba(0,113,227,0.4);
}
.cluster-icon-lg {
  width: 50px; height: 50px; font-size: 15px;
  background: #005DC0;
}

/* Map toolbar */
.map-toolbar {
  position: absolute; top: 12px; left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  display: flex; gap: 8px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 6px 8px;
  box-shadow: var(--sh-md);
}
.map-toolbar-btn {
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 13px; font-weight: 500;
  border: none; background: transparent; color: var(--text-2);
  cursor: pointer; display: flex; align-items: center; gap: 5px;
  transition: all var(--t-fast);
}
.map-toolbar-btn:hover { background: var(--bg); color: var(--text-1); }
.map-toolbar-btn.active { background: var(--blue); color: #fff; }
.map-toolbar-btn svg { width: 14px; height: 14px; }

/* Map legend */
.map-legend {
  position: absolute; bottom: 28px; right: 12px;
  z-index: 400;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  box-shadow: var(--sh-md);
  font-size: 12px;
  min-width: 160px;
}
.legend-title { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.legend-item { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; font-size: 12px; color: var(--text-2); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.legend-circle { width: 14px; height: 8px; border-radius: 100px; border: 1.5px solid; flex-shrink: 0; }

/* Map sidebar toggle */
.sidebar-toggle {
  position: absolute; left: calc(var(--sidebar-w)); top: 50%;
  transform: translateY(-50%);
  z-index: 500;
  width: 20px; height: 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-3);
  transition: all var(--t);
  box-shadow: 2px 0 8px rgba(0,0,0,0.06);
}
.sidebar-toggle:hover { color: var(--text-1); background: var(--bg); }

/* ============================================================
   HOME PAGE SECTIONS
   ============================================================ */
.section-header {
  margin-bottom: 28px;
}
.section-eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 600; color: var(--blue);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.section-title { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.section-desc { font-size: 15px; color: var(--text-2); max-width: 520px; }

/* Report mini card (home page list) */
.report-card {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: flex-start; gap: 12px;
  transition: background var(--t-fast);
  cursor: pointer; text-decoration: none; color: inherit;
}
.report-card:hover { background: var(--bg); }
.report-card:last-child { border-bottom: none; }
.report-card-icon {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 13px; font-weight: 700; color: #fff;
}
.report-card-body { flex: 1; min-width: 0; }
.report-card-title { font-size: 14px; font-weight: 500; color: var(--text-1); margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-card-meta  { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 8px; }
.report-card-status { flex-shrink: 0; }

/* Danger zone card */
.danger-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
  cursor: pointer;
  transition: all var(--t);
}
.danger-card:hover { box-shadow: var(--sh-md); transform: translateY(-1px); }
.danger-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.danger-card-title { font-size: 15px; font-weight: 600; }
.danger-level {
  padding: 3px 9px; border-radius: 100px;
  font-size: 11px; font-weight: 600;
}
.danger-level.kritisch { background: var(--red-light); color: #B5231A; border: 1px solid var(--red-border); }
.danger-level.erhoht   { background: var(--orange-light); color: #8A5500; border: 1px solid var(--orange-border); }
.danger-level.mittel   { background: var(--blue-light); color: #005CBD; border: 1px solid var(--blue-border); }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.step {
  text-align: center; padding: 32px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  position: relative;
}
.step-number {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--blue-light); border: 2px solid var(--blue-border);
  color: var(--blue); font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.step-icon-wrap {
  width: 56px; height: 56px; border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  background: var(--blue-light);
}
.step-icon-wrap svg { width: 26px; height: 26px; color: var(--blue); }
.step h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.step p  { font-size: 14px; color: var(--text-2); line-height: 1.55; }

/* ============================================================
   SUPPORT PAGE
   ============================================================ */
.support-hero {
  background: linear-gradient(160deg, #f0f7ff 0%, #F5F5F7 60%);
  padding: 60px 0 48px; text-align: center;
  border-bottom: 1px solid var(--border);
}
.support-hero h1 { font-size: 36px; font-weight: 700; letter-spacing: -0.025em; margin-bottom: 10px; }
.support-hero p  { font-size: 17px; color: var(--text-2); max-width: 460px; margin: 0 auto 28px; }

.quick-help { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-top: 28px; }
.qh-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px;
  text-align: center; cursor: pointer;
  transition: all var(--t); text-decoration: none; color: inherit;
}
.qh-card:hover { box-shadow: var(--sh-md); transform: translateY(-2px); text-decoration: none; color: inherit; }
.qh-icon {
  width: 48px; height: 48px; border-radius: var(--r-md);
  background: var(--blue-light); display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
}
.qh-icon svg { width: 22px; height: 22px; color: var(--blue); }
.qh-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.qh-card p  { font-size: 13px; color: var(--text-2); }

/* FAQ accordion */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); overflow: hidden;
}
.faq-question {
  width: 100%; text-align: left; padding: 16px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 15px; font-weight: 500; color: var(--text-1);
  background: transparent; border: none; cursor: pointer;
  font-family: inherit;
  transition: color var(--t-fast);
}
.faq-question:hover { color: var(--blue); }
.faq-question svg {
  width: 18px; height: 18px; flex-shrink: 0; color: var(--text-3);
  transition: transform var(--t);
}
.faq-item.open .faq-question svg { transform: rotate(180deg); color: var(--blue); }
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height var(--t-slow), padding var(--t);
  font-size: 14px; color: var(--text-2); line-height: 1.65;
  padding: 0 18px;
}
.faq-item.open .faq-answer { max-height: 300px; padding: 0 18px 16px; }

/* Contact form */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 13px; font-weight: 500;
  color: var(--text-1); margin-bottom: 6px;
}
.form-label span { color: var(--red); margin-left: 2px; }
.form-input, .form-textarea, .form-select-full {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 14px; color: var(--text-1);
  background: var(--surface);
  outline: none; font-family: inherit;
  transition: border-color var(--t), box-shadow var(--t);
}
.form-input:focus, .form-textarea:focus, .form-select-full:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,113,227,0.12);
}
.form-textarea { min-height: 100px; resize: vertical; line-height: 1.55; }
.form-hint { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  padding: 24px;
}
.login-card {
  width: 100%; max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  padding: 40px 36px;
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo-img { margin: 0 auto 10px; }
.login-logo h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.login-logo p  { font-size: 14px; color: var(--text-2); margin-top: 4px; }
.login-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: var(--text-3); font-size: 12px;
}
.login-divider::before, .login-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.login-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-2); }
.login-footer a { color: var(--blue); }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px 0 28px;
  margin-top: auto;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px;
  margin-bottom: 32px;
}
.footer-brand p { font-size: 13px; color: var(--text-2); margin-top: 10px; line-height: 1.6; max-width: 280px; }
.footer-col h4 { font-size: 13px; font-weight: 600; margin-bottom: 12px; color: var(--text-1); }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.footer-col ul li a { font-size: 13px; color: var(--text-2); transition: color var(--t-fast); text-decoration: none; }
.footer-col ul li a:hover { color: var(--blue); text-decoration: none; }
.footer-bottom {
  padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--text-3); flex-wrap: wrap; gap: 8px;
}
.footer-bottom-links { display: flex; gap: 16px; }
.footer-bottom-links a { color: var(--text-3); text-decoration: none; }
.footer-bottom-links a:hover { color: var(--text-2); }

/* ============================================================
   UTILITY / MISC
   ============================================================ */
.divider { height: 1px; background: var(--border-subtle); margin: 24px 0; }
.empty-state {
  text-align: center; padding: 48px 24px;
  color: var(--text-2);
}
.empty-state svg { width: 40px; height: 40px; margin: 0 auto 12px; color: var(--border); }
.empty-state h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.empty-state p  { font-size: 14px; }

.toast-wrap {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 9999; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.toast {
  padding: 10px 18px;
  background: var(--text-1); color: #fff;
  border-radius: 100px;
  font-size: 13px; font-weight: 500;
  box-shadow: var(--sh-lg);
  pointer-events: all;
  animation: toastIn 200ms ease;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.toast.fade { animation: toastOut 300ms ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }

/* Count-up number */
.count-up { transition: all 800ms ease; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: #c0c0ca; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .grid-3 { grid-template-columns: repeat(2,1fr); }
  .hero-title { font-size: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .quick-help { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .hero-title { font-size: 28px; }
  .navbar-links { display: none; }
  .login-card { padding: 28px 20px; }
}
