/* =====================================================
   EL SCOOTER ALERT – CSS
   Dark tactical UI, neon accents, mobile-first
   ===================================================== */

:root {
  --bg0: #05030d;
  --bg1: #100b1f;
  --bg2: #18122d;
  --bg3: #221d3f;
  --bg4: #2e264e;
  --accent: #a855f7;
  --accent2: #c084fc;
  --accent-dim: rgba(168,85,247,0.18);
  --accent-border: rgba(168,85,247,0.35);
  --blue: #818cf8;
  --blue-dim: rgba(129,140,248,0.15);
  --red: #ef4444;
  --red-dim: rgba(239,68,68,0.15);
  --green: #22c55e;
  --green-dim: rgba(34,197,94,0.15);
  --amber: #f59e0b;
  --text1: #eef2ff;
  --text2: #b8b2d1;
  --text3: #7c78a0;
  --border: rgba(255,255,255,0.08);
  --border2: rgba(255,255,255,0.14);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --header-h: 60px;
  --nav-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.storage-banner {
  flex-shrink: 0;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border-bottom: 1px solid rgba(245, 158, 11, 0.25);
}

html, body {
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: radial-gradient(circle at top, rgba(155,126,255,0.18), transparent 26%), linear-gradient(180deg, #09040f 0%, #05030d 62%, #05030d 100%);
  color: var(--text1);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

#app { background: transparent; }

/* ---- SPLASH ---- */
#splash {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg0);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s ease;
}

#splash.fade-out { opacity: 0; pointer-events: none; }

#splash.hidden {
  display: none !important;
  pointer-events: none;
}

.splash-inner { text-align: center; max-width: 320px; padding: 0 18px; }

.splash-icon {
  font-size: 60px;
  display: block;
  margin-bottom: 16px;
  animation: splashBounce 1s ease infinite alternate;
}

.splash-disclaimer {
  margin: 18px 0 10px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(238,242,255,0.82);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(168,85,247,0.14);
  border-radius: 16px;
  padding: 14px 16px;
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
  animation: fadeInText 0.8s ease forwards;
}

.splash-meta {
  font-size: 11px;
  color: rgba(238,242,255,0.65);
  letter-spacing: 0.6px;
  margin-bottom: 12px;
}

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

@keyframes splashBounce {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}

.splash-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text1);
}

.splash-title span { color: var(--accent); }

.splash-sub {
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--text2);
  text-transform: uppercase;
  margin-top: 6px;
}

.splash-loader {
  width: 160px; height: 3px;
  background: var(--bg3);
  border-radius: 99px;
  margin: 28px auto 0;
  overflow: hidden;
}

.splash-bar {
  height: 100%; width: 0;
  background: var(--accent);
  border-radius: 99px;
  animation: loadBar 1.8s ease forwards;
}

@keyframes loadBar { to { width: 100%; } }

.splash-loader {
  background: rgba(255,255,255,0.06);
}
.splash-bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, rgba(192,132,252,0.95), rgba(168,85,247,0.95));
  border-radius: 99px;
  animation: loadBar 1.8s ease forwards;
}

/* ---- TRANSITIONS ---- */
* {
  transition: background-color 0.24s ease, color 0.24s ease, border-color 0.24s ease, transform 0.2s ease;
}
.tab-panel {
  display: none;
  flex: 1;
  overflow: hidden;
  position: relative;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.tab-panel.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}
#app {
  display: flex;
  flex-direction: column;
  height: 100%;
  height: 100dvh;
  min-height: 0;
}

#app.hidden { display: none; }

.notify-prompt {
  flex-shrink: 0;
}

/* ---- HEADER ---- */
.header {
  height: var(--header-h);
  background: var(--bg1);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
  position: relative;
  z-index: 100;
}

.header::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-border), transparent);
}

.header-left { display: flex; align-items: center; gap: 10px; }

.logo-mark {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.logo-main {
  display: block;
  font-family: 'Rajdhani', sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text1);
  line-height: 1.1;
}

.logo-accent { color: var(--accent); }

.logo-tagline {
  display: block;
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--text3);
  text-transform: uppercase;
}

.header-right { display: flex; align-items: center; gap: 10px; }

.live-pill {
  display: flex; align-items: center; gap: 5px;
  background: var(--accent-dim);
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: 99px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--accent2);
}

.live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: livePulse 1.5s infinite;
}

@keyframes livePulse {
  0%,100% { opacity: 1; }
  50% { opacity: 0.2; }
}

.report-count {
  background: var(--accent);
  color: var(--bg0);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  min-width: 32px;
  text-align: center;
}

.user-count {
  background: rgba(168,85,247,0.12);
  color: var(--accent2);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  border: 1px solid rgba(168,85,247,0.2);
}

.admin-only { display: none; }
.admin-active .admin-only { display: block; }

/* ---- TAB NAV (unten) ---- */
.tab-nav {
  height: calc(var(--nav-h) + var(--safe-bottom));
  background: var(--bg1);
  border-top: 1px solid var(--border);
  border-bottom: none;
  display: flex;
  flex-shrink: 0;
  padding-bottom: var(--safe-bottom);
  order: 10;
  z-index: 120;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text3);
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
  position: relative;
}
.tab-btn:hover { color: var(--accent2); transform: translateY(-1px); }

.tab-btn svg {
  width: 22px; height: 22px;
  transition: all 0.2s;
}

.tab-btn.active {
  color: var(--accent);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%; height: 2px;
  background: var(--accent);
  border-radius: 0 0 99px 99px;
}

.tab-btn-report {
  background: var(--accent-dim);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.tab-btn-report.active, .tab-btn-report:not(.active) {
  color: var(--accent2);
}

/* ---- TAB PANELS ---- */
.tab-panel {
  display: none;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.tab-panel.active {
  display: flex;
  flex-direction: column;
}

/* Karte: kein Opacity-Transition – sonst falsche Leaflet-Maße beim Start */
#tab-map.tab-panel {
  opacity: 1;
  transform: none;
  transition: none;
}

/* ---- MAP ---- */
#tab-map {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

#map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #0d1117;
  z-index: 1;
}

/* Leaflet dark override */
.leaflet-container { background: #0d1117 !important; }
.leaflet-control-zoom { display: none; }

.map-overlay-top {
  position: absolute;
  top: 12px; right: 12px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 1000;
}

.map-ctrl-btn {
  width: 42px; height: 42px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  transition: all 0.2s;
}

.map-ctrl-btn svg { width: 18px; height: 18px; }
.map-ctrl-btn:hover { background: var(--bg3); border-color: var(--accent-border); }

.map-fab {
  position: absolute;
  bottom: 20px; right: 16px;
  background: var(--accent);
  color: var(--bg0);
  border-radius: var(--radius-lg);
  padding: 12px 20px;
  display: flex; align-items: center; gap: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(245,158,11,0.5);
  z-index: 1000;
  transition: all 0.2s;
}

.map-fab svg { width: 18px; height: 18px; }
.map-fab:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(245,158,11,0.6); }
.map-fab:active { transform: scale(0.97); }

/* Custom Marker */
.custom-marker {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  font-size: 16px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.5);
  border: 2px solid rgba(255,255,255,0.2);
}

.custom-marker span { transform: rotate(45deg); display: block; }

.marker-hoch { background: var(--red); }
.marker-mittel { background: var(--amber); }
.marker-niedrig { background: var(--green); }

/* Leaflet Popup */
.leaflet-popup-content-wrapper {
  background: var(--bg2) !important;
  border: 1px solid var(--border2) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6) !important;
  color: var(--text1) !important;
}

.leaflet-popup-tip { background: var(--bg2) !important; }
.leaflet-popup-close-button { color: var(--text2) !important; font-size: 18px !important; }

.popup-inner { padding: 4px; min-width: 180px; }
.popup-type { font-size: 16px; font-weight: 600; color: var(--text1); margin-bottom: 4px; }
.popup-location { font-size: 11px; color: var(--text2); margin-bottom: 8px; display: flex; align-items: center; gap: 4px; }
.popup-note { font-size: 12px; color: var(--text2); margin-bottom: 8px; line-height: 1.5; }
.popup-footer { display: flex; align-items: center; justify-content: space-between; }
.popup-time { font-size: 10px; color: var(--text3); }
.popup-badge {
  font-size: 9px; font-weight: 700; letter-spacing: 0.5px;
  padding: 2px 7px; border-radius: 99px;
  text-transform: uppercase;
}
.badge-hoch { background: var(--red-dim); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
.badge-mittel { background: rgba(245,158,11,0.15); color: #fcd34d; border: 1px solid rgba(245,158,11,0.3); }
.badge-niedrig { background: var(--green-dim); color: #86efac; border: 1px solid rgba(34,197,94,0.3); }

/* ---- FEED ---- */
.feed-header {
  background: var(--bg1);
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  flex-shrink: 0;
}

.feed-filter {
  display: flex; gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.feed-filter::-webkit-scrollbar { display: none; }

.filter-pill {
  flex-shrink: 0;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  font-family: 'DM Sans', sans-serif;
}

.filter-pill.active {
  background: var(--accent-dim);
  border-color: var(--accent-border);
  color: var(--accent2);
}

.feed-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.14);
  color: var(--accent2);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  letter-spacing: 0.5px;
  cursor: pointer;
}
.admin-btn:hover {
  background: rgba(168,85,247,0.12);
}
.notify-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.14);
  color: var(--accent2);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 11px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s;
}
.notify-btn:hover {
  background: rgba(168,85,247,0.12);
}
.notify-btn.active {
  background: rgba(168,85,247,0.2);
  border-color: rgba(168,85,247,0.35);
  color: #f8f7ff;
}
.notify-prompt {
  display: none;
  padding: 0 16px 12px;
}
.notify-prompt.show {
  display: block;
}
.notify-prompt-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(168,85,247,0.15);
  border-radius: var(--radius-xl);
  padding: 14px 16px;
}
.notify-prompt-text {
  min-width: 0;
  flex: 1 1 240px;
}
.notify-prompt-text strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #f8f7ff;
  margin-bottom: 4px;
}
.notify-prompt-text p {
  margin: 0;
  color: var(--text3);
  font-size: 12px;
  line-height: 1.45;
}
.notify-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.notify-dismiss {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text2);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  cursor: pointer;
}
.notify-dismiss:hover {
  background: rgba(255,255,255,0.04);
}
.admin-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(168,85,247,0.12);
  color: var(--accent2);
  border: 1px solid rgba(168,85,247,0.22);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
}

.admin-badge[hidden] {
  display: none !important;
}

.admin-badge.is-admin {
  color: #f8f7ff;
  background: rgba(168, 85, 247, 0.22);
}

.admin-modal-hint {
  margin-top: 14px;
  color: var(--text3);
  font-size: 12px;
  line-height: 1.5;
}

.stats-empty {
  color: var(--text3);
  font-size: 13px;
  padding: 8px 0;
}
.admin-modal {
  position: fixed;
  inset: 0;
  background: rgba(5,3,13,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}
.admin-modal.show {
  display: flex;
}
.admin-modal-panel {
  width: min(420px, 100%);
  max-height: min(92vh, 900px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: rgba(18,12,34,0.96);
  border: 1px solid rgba(168,85,247,0.18);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 72px rgba(0,0,0,0.6);
  padding: 26px;
}

.admin-modal.show .admin-modal-panel:has(#adminDashboardView:not([hidden])) {
  width: min(960px, 100%);
  max-height: 92vh;
}

.admin-modal-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text3);
}
.admin-modal-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 20px;
}
.admin-modal-header h3 {
  font-size: 18px;
  margin: 0;
  color: var(--text1);
}
.admin-modal-close {
  background: transparent;
  border: none;
  color: var(--text2);
  font-size: 20px;
  cursor: pointer;
}
.admin-modal-field {
  display: grid; gap: 10px;
}
.admin-modal-field label {
  font-size: 12px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.admin-modal-field input {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: var(--text1);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.admin-modal-field input::placeholder {
  color: rgba(255,255,255,0.5);
}
.admin-modal-actions {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px;
}
.admin-modal-submit,
.admin-modal-logout {
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  cursor: pointer;
  font-weight: 700;
}
.admin-modal-logout {
  background: rgba(255,255,255,0.08);
  color: var(--accent2);
}
.admin-delete {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(239,68,68,0.12);
  color: #fda4af;
  border: 1px solid rgba(239,68,68,0.18);
}
.admin-delete:hover {
  background: rgba(239,68,68,0.2);
}

.feed-loading {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 60px 20px; color: var(--text2); font-size: 13px;
}

.spinner {
  width: 32px; height: 32px;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.feed-empty {
  text-align: center; padding: 60px 20px;
  color: var(--text2);
}

.feed-empty .empty-icon { font-size: 48px; margin-bottom: 12px; display: block; }
.feed-empty strong { display: block; color: var(--text1); margin-bottom: 4px; }

/* Report Card */
.report-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  padding: 14px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  animation: cardIn 0.3s ease;
}
.report-card:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(0,0,0,0.18); }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.report-card:hover { border-color: var(--border2); }

.card-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 10px;
}

.card-type-info {
  display: flex; align-items: center; gap: 10px;
}

.card-emoji {
  width: 40px; height: 40px;
  background: var(--bg3);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.card-type-name { font-size: 14px; font-weight: 600; color: var(--text1); }
.card-type-sub { font-size: 11px; color: var(--text3); margin-top: 2px; }

.urgency-badge {
  font-size: 10px; font-weight: 700;
  padding: 3px 9px; border-radius: 99px;
  letter-spacing: 0.5px; text-transform: uppercase;
  flex-shrink: 0;
}

.card-location {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text2);
  margin-bottom: 8px;
}

.card-location svg { width: 13px; height: 13px; color: var(--accent); flex-shrink: 0; }

.card-note {
  font-size: 13px; color: var(--text2);
  line-height: 1.5; margin-bottom: 10px;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.card-footer {
  display: flex; align-items: center; justify-content: space-between;
}

.card-meta { font-size: 11px; color: var(--text3); display: flex; align-items: center; gap: 6px; }
.card-author { color: var(--accent2); font-weight: 500; }

.vote-row { display: flex; gap: 6px; }

.vote-btn {
  display: flex; align-items: center; gap: 4px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 12px; color: var(--text2);
  cursor: pointer;
  transition: all 0.15s;
}

.vote-btn svg { width: 13px; height: 13px; }
.vote-btn:hover { border-color: var(--accent-border); color: var(--accent2); }
.vote-btn.voted { border-color: var(--accent-border); color: var(--accent2); background: var(--accent-dim); }

/* ---- REPORT FORM ---- */
.report-form {
  flex: 1; overflow-y: auto;
  padding: 16px;
  display: flex; flex-direction: column; gap: 20px;
}

.form-title {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 18px; font-weight: 600;
  color: var(--text1);
}

.form-title svg { width: 20px; height: 20px; color: var(--accent); }

.form-title-row {
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.form-title-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.report-back-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border2);
  background: var(--bg2);
  color: var(--accent2);
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.form-section { display: flex; flex-direction: column; gap: 8px; }

.form-label {
  font-size: 10px; font-weight: 600;
  letter-spacing: 1.5px; color: var(--text3);
  text-transform: uppercase;
}

.type-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}

.type-card {
  background: rgba(255,255,255,0.02);
  border: 1.5px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
  text-align: center;
}
.type-card:hover { transform: translateY(-2px); border-color: rgba(168,85,247,0.4); background: rgba(168,85,247,0.08); }
.type-card.selected { border-color: var(--accent); background: rgba(168,85,247,0.18); box-shadow: 0 12px 32px rgba(168,85,247,0.12); }

.tc-emoji { font-size: 26px; }
.tc-name { font-size: 11px; font-weight: 500; color: var(--text1); line-height: 1.2; }

.urgency-row { display: flex; gap: 8px; }

.urgency-btn {
  flex: 1;
  padding: 10px 6px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  text-align: center;
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  color: var(--text2);
  transition: all 0.15s;
  background: var(--bg2);
}

.urgency-btn.sel-hoch { border-color: #ef4444; background: var(--red-dim); color: #fca5a5; }
.urgency-btn.sel-mittel { border-color: #f59e0b; background: rgba(245,158,11,0.12); color: #fcd34d; }
.urgency-btn.sel-niedrig { border-color: #22c55e; background: var(--green-dim); color: #86efac; }

.location-box {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(168,85,247,0.12);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}

.location-note {
  font-size: 11px;
  color: var(--text3);
  margin-top: 8px;
  padding-left: 4px;
}

.loc-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.loc-info svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.loc-text strong { display: block; font-size: 13px; color: var(--text1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loc-text small { display: block; font-size: 11px; color: var(--text3); }

.gps-btn {
  display: flex; align-items: center; gap: 5px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--accent2);
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  font-family: 'DM Sans', sans-serif;
}

.gps-btn svg { width: 14px; height: 14px; }
.gps-btn:hover { background: rgba(245,158,11,0.25); }

.gps-btn.loading { opacity: 0.7; }
.gps-btn.success { border-color: rgba(34,197,94,0.4); background: var(--green-dim); color: #86efac; }

.form-input {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text1);
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}

.form-input:focus { border-color: var(--accent-border); }
.form-input::placeholder { color: var(--text3); }
.form-textarea { resize: none; height: 90px; line-height: 1.6; }

.submit-btn {
  width: 100%;
  background: linear-gradient(135deg, rgba(168,85,247,0.96), rgba(192,132,252,0.96));
  border: none;
  border-radius: var(--radius-lg);
  padding: 16px;
  color: var(--bg0);
  font-family: 'Rajdhani', sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  box-shadow: 0 10px 30px rgba(168,85,247,0.24);
}

.submit-btn svg { width: 18px; height: 18px; }
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(168,85,247,0.32); }
.submit-btn:active { transform: scale(0.98); }
.submit-btn:disabled { opacity: 0.6; pointer-events: none; }
.submit-btn.success { animation: submitSuccess 0.7s ease forwards; background: linear-gradient(135deg, #22c55e, #86efac); }

@keyframes submitSuccess {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

.form-hint { font-size: 11px; color: var(--text3); text-align: center; line-height: 1.6; }

/* ---- STATS ---- */
.stats-panel { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; }

.stats-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 18px; font-weight: 600; color: var(--text1);
}

.user-stat-panel {
  display: grid; gap: 10px;
  margin-top: 12px;
  padding: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(168,85,247,0.12);
  border-radius: var(--radius-lg);
}
.user-stat-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
.user-stat-label {
  font-size: 12px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.user-stat-value {
  font-family: 'Rajdhani', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

#adminUserList {
  margin-top: 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(168,85,247,0.12);
  border-radius: var(--radius-lg);
  padding: 14px;
}
#adminUserList .user-list-title {
  font-size: 12px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
#adminUserList .user-list-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,0.05);
}
#adminUserList .user-list-item:first-child { border-top: none; }
#adminUserList .user-id { font-size: 13px; color: var(--text1); }
#adminUserList .user-meta { font-size: 11px; color: var(--text3); }

.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: center;
}

.stat-val {
  font-family: 'Rajdhani', sans-serif;
  font-size: 36px; font-weight: 700;
  color: var(--accent); line-height: 1;
  margin-bottom: 6px;
}

.stat-lbl { font-size: 11px; color: var(--text2); text-transform: uppercase; letter-spacing: 1px; }

.stats-section-title {
  font-size: 12px; font-weight: 600; color: var(--text3);
  text-transform: uppercase; letter-spacing: 1.5px;
}

.type-stats-list { display: flex; flex-direction: column; gap: 8px; }

.type-stat-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg2); border-radius: var(--radius-md);
  padding: 10px 14px;
  border: 1px solid var(--border);
}

.type-stat-emoji { font-size: 20px; width: 28px; }
.type-stat-info { flex: 1; }
.type-stat-name { font-size: 13px; font-weight: 500; color: var(--text1); }
.type-stat-bar-wrap { height: 4px; background: var(--bg4); border-radius: 99px; margin-top: 5px; overflow: hidden; }
.type-stat-bar { height: 100%; background: var(--accent); border-radius: 99px; transition: width 0.8s ease; }
.type-stat-count { font-family: 'Rajdhani', sans-serif; font-size: 18px; font-weight: 700; color: var(--text1); }

.chart-area {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  min-height: 120px;
}

.chart-bars {
  display: flex; align-items: flex-end; gap: 3px;
  height: 80px;
}

.chart-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.chart-bar-inner { width: 100%; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; transition: height 0.6s ease; }
.chart-bar-label { font-size: 9px; color: var(--text3); }

.app-info {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(168,85,247,0.14);
  border-radius: var(--radius-lg);
  padding: 18px;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.app-info-title { font-family: 'Rajdhani', sans-serif; font-size: 18px; font-weight: 700; color: var(--accent); margin-bottom: 10px; }
.app-info-text { font-size: 12px; color: var(--text2); line-height: 1.8; margin-bottom: 10px; }
.app-info-version { font-size: 10px; color: var(--text3); letter-spacing: 1px; }

.disclaimer-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(168,85,247,0.12);
  border-radius: var(--radius-lg);
  padding: 16px;
  color: var(--text2);
  line-height: 1.7;
}
.disclaimer-title {
  font-family: 'Rajdhani', sans-serif;
  color: var(--accent2);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}
.disclaimer-text {
  font-size: 12px;
  color: var(--text3);
}

/* ---- TOAST ---- */
.toast {
  position: fixed;
  top: calc(var(--header-h) + 12px);
  left: 50%; transform: translateX(-50%) translateY(-10px);
  background: var(--bg3);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  font-size: 13px; font-weight: 500;
  z-index: 9000;
  opacity: 0; pointer-events: none;
  transition: all 0.3s ease;
  white-space: nowrap;
  display: flex; align-items: center; gap: 8px;
  max-width: 90vw;
  text-overflow: ellipsis;
  overflow: hidden;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { border: 1px solid rgba(34,197,94,0.35); color: #86efac; }
.toast.error { border: 1px solid rgba(239,68,68,0.35); color: #fca5a5; }
.toast.info { border: 1px solid var(--accent-border); color: var(--accent2); }

/* ---- SCROLLBARS ---- */
* { scrollbar-width: thin; scrollbar-color: var(--bg4) transparent; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 99px; }

/* ---- ADMIN LIVE DASHBOARD ---- */
#adminDashboardView {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-right: 4px;
}

.admin-dash-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.admin-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent2);
  text-transform: uppercase;
}

.admin-live-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.8);
  animation: adminPulse 1.4s ease infinite;
}

@keyframes adminPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

.admin-refresh-btn {
  margin-left: auto;
  border: 1px solid var(--accent-border);
  background: var(--accent-dim);
  color: var(--accent2);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

@media (max-width: 720px) {
  .admin-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.admin-kpi {
  background: linear-gradient(145deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 12px;
  text-align: center;
}

.admin-kpi.live {
  border-color: rgba(34, 197, 94, 0.35);
  box-shadow: inset 0 0 24px rgba(34, 197, 94, 0.08);
}

.admin-kpi .kpi-val {
  display: block;
  font-family: 'Rajdhani', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--text1);
  line-height: 1.1;
}

.admin-kpi .kpi-lbl {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: var(--text3);
  letter-spacing: 0.5px;
}

.admin-insights {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.admin-insight-block {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(168,85,247,0.12);
  border-radius: 14px;
  padding: 12px;
}

.admin-insight-block.muted {
  font-size: 11px;
  color: var(--text3);
}

.admin-insight-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text3);
  margin-bottom: 8px;
}

.admin-insight-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.insight-chip {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(168,85,247,0.12);
  border: 1px solid rgba(168,85,247,0.2);
  color: var(--text2);
}

.insight-chip strong { color: var(--accent2); margin-left: 4px; }

.admin-section-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent2);
  margin: 8px 0 12px;
  text-transform: uppercase;
}

.admin-user-cards {
  display: grid;
  gap: 14px;
  padding-bottom: 8px;
}

.admin-user-card {
  background: linear-gradient(160deg, rgba(24,18,45,0.95), rgba(12,8,24,0.98));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
}

.admin-user-card.is-live {
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.15), 0 16px 40px rgba(0,0,0,0.35);
}

.admin-user-card.is-recent {
  border-color: rgba(168, 85, 247, 0.35);
}

.admin-user-card.is-idle {
  opacity: 0.88;
}

.auc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.auc-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.auc-pulse {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  animation: adminPulse 1.2s ease infinite;
}

.auc-title {
  flex: 1;
  min-width: 0;
}

.auc-title strong {
  display: block;
  font-size: 15px;
  color: var(--text1);
}

.auc-id {
  display: block;
  font-size: 10px;
  color: var(--text3);
  font-family: monospace;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auc-status {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: var(--text2);
  white-space: nowrap;
}

.is-live .auc-status {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}

.auc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 640px) {
  .auc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.auc-field {
  background: rgba(0,0,0,0.2);
  border-radius: 10px;
  padding: 8px 10px;
  min-height: 52px;
}

.auc-field span {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text3);
  margin-bottom: 4px;
}

.auc-field strong {
  display: block;
  font-size: 12px;
  color: var(--text1);
  word-break: break-word;
  font-weight: 500;
}

.auc-ua {
  margin-top: 10px;
  font-size: 10px;
  color: var(--text3);
  line-height: 1.5;
  word-break: break-all;
  padding: 8px;
  background: rgba(0,0,0,0.25);
  border-radius: 8px;
}

.auc-history {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 11px;
  color: var(--text2);
  line-height: 1.6;
}

.admin-empty,
.admin-error {
  text-align: center;
  padding: 24px;
  color: var(--text3);
  font-size: 13px;
  border: 1px dashed rgba(255,255,255,0.12);
  border-radius: 14px;
}

.admin-error { color: #fca5a5; border-color: rgba(239,68,68,0.3); }
