/* =========================================================
   Prospekt-Preis-Tracker — Design System
   Dark-Mode Premium with glassmorphism & animations
   ========================================================= */

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

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --bg:          #0d1117;
  --bg-2:        #161b22;
  --bg-3:        #1c2128;
  --border:      rgba(255,255,255,0.08);
  --border-hover:rgba(255,255,255,0.18);
  --text:        #e6edf3;
  --text-muted:  #7d8590;
  --text-dim:    #484f58;
  --accent:      #16a34a;
  --accent-light:#22c55e;
  --accent-glow: rgba(22,163,74,0.25);
  --red:         #ef4444;
  --amber:       #f59e0b;
  --blue:        #3b82f6;
  --radius-sm:   8px;
  --radius:      14px;
  --radius-lg:   20px;
  --shadow:      0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg:   0 8px 48px rgba(0,0,0,0.6);
  --glass:       rgba(255,255,255,0.04);
  --glass-hover: rgba(255,255,255,0.07);

  /* Store brand colors */
  --lidl:    #FFD700;
  --rewe:    #CC0000;
  --aldi:    #0066B2;
  --penny:   #EE2222;
  --edeka:   #00843D;
  --netto:   #F5A800;
  --dm:      #E30613;
  --rossmann: #E2001A;
  --kaufland: #E10915;
}

/* ── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ── Typography ──────────────────────────────────────────── */
h1 { font-size: clamp(1.5rem, 4vw, 2.25rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: 1rem; font-weight: 600; }
p  { color: var(--text-muted); }

/* ── Layout ──────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ── Navigation ──────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,17,23,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo span { color: var(--accent-light); }
.logo-icon { font-size: 1.4rem; }

.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--glass-hover);
}
.nav-link.active { color: var(--accent-light); }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  padding: 64px 20px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(22,163,74,0.12), transparent),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(59,130,246,0.06), transparent);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: rgba(22,163,74,0.12);
  border: 1px solid rgba(22,163,74,0.3);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: 20px;
}
.hero h1 { margin-bottom: 12px; }
.hero p { font-size: 1.05rem; max-width: 520px; margin: 0 auto 32px; }

/* ── Search ──────────────────────────────────────────────── */
.search-wrapper {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
}
.search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 6px 6px 6px 20px;
  gap: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}
.search-icon { color: var(--text-dim); font-size: 1.1rem; flex-shrink: 0; }
#searchInput {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}
#searchInput::placeholder { color: var(--text-dim); }
.search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--accent), #15803d);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.search-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px var(--accent-glow); }
.search-btn:active { transform: translateY(0); }

/* Autocomplete */
.autocomplete-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--bg-2);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  z-index: 50;
  display: none;
}
.autocomplete-list.show { display: block; }
.autocomplete-item {
  padding: 12px 20px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: background 0.15s;
  display: flex;
  align-items: center;
  gap: 10px;
}
.autocomplete-item:hover { background: var(--glass-hover); color: var(--text); }

/* ── Store Filter Pills ──────────────────────────────────── */
.store-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 20px;
}
.store-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-3);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}
.store-pill:hover { border-color: var(--border-hover); color: var(--text); }
.store-pill.active { color: #fff; border-color: transparent; }
.store-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ── Stats Bar ───────────────────────────────────────────── */
.stats-bar {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 20px;
  margin-bottom: 8px;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-light);
  letter-spacing: -0.03em;
}
.stat-label { font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }

/* ── Section ─────────────────────────────────────────────── */
.section { padding: 32px 20px; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}
.section-title { display: flex; align-items: center; gap: 10px; }
.result-count {
  font-size: 0.8rem;
  color: var(--text-dim);
  background: var(--bg-3);
  padding: 4px 12px;
  border-radius: 999px;
}

/* ── Product Grid ────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Product Card ────────────────────────────────────────── */
.product-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s;
  position: relative;
  cursor: pointer;
}
.product-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.product-card:hover .card-actions { opacity: 1; }

.card-store-bar {
  height: 4px;
  border-radius: 2px 2px 0 0;
}

/* ── Produktbild ─────────────────────────────────────────── */
.card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 180px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-3);
}
.card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: transform 0.3s ease;
}
.product-card:hover .card-img {
  transform: scale(1.05);
}
.card-img-placeholder {
  border-bottom: 1px solid var(--border);
}
.card-img-initial {
  font-size: 3.5rem;
  font-weight: 900;
  opacity: 0.35;
  line-height: 1;
  user-select: none;
}
/* Rabatt-Badge über dem Bild */
.card-img-wrap .card-discount {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  background: var(--red);
  padding: 3px 8px;
  border-radius: 8px;
  z-index: 1;
  box-shadow: 0 2px 8px rgba(239,68,68,0.4);
}



.card-body { padding: 16px; flex: 1; }

.card-store {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-quantity { font-size: 0.8rem; color: var(--text-dim); margin-bottom: 12px; }

.card-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.card-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-light);
  letter-spacing: -0.03em;
}
.card-orig-price {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-decoration: line-through;
}
.card-discount {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: var(--red);
  padding: 2px 7px;
  border-radius: 6px;
  margin-left: auto;
}

.card-validity {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 6px;
  width: fit-content;
}
.card-validity.urgent {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #ef4444 !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  font-weight: 700;
}
.card-validity.warning {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #f59e0b !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
  font-weight: 600;
}

.card-actions {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.2s;
}
.btn-watch {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  background: rgba(22,163,74,0.12);
  border: 1px solid rgba(22,163,74,0.25);
  border-radius: var(--radius-sm);
  color: var(--accent-light);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-watch:hover { background: rgba(22,163,74,0.2); }
.btn-history {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-history:hover { background: var(--glass-hover); color: var(--text); }

/* ── Empty State ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 64px 20px;
  color: var(--text-dim);
  grid-column: 1 / -1;
}
.empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { color: var(--text-muted); margin-bottom: 8px; }

/* ── Loading ─────────────────────────────────────────────── */
.loading-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}
.skeleton-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  animation: pulse 1.5s ease-in-out infinite;
}
.skeleton-line {
  background: var(--bg-3);
  border-radius: 4px;
  margin-bottom: 10px;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* ── Modal ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s;
}
.modal-overlay.open {
  opacity: 1 !important;
  visibility: visible !important;
  display: flex !important;
}

.modal {
  background: var(--bg-2);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95) translateY(12px);
  transition: transform 0.25s;
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--text); }

/* ── Form Elements ───────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
input[type="text"],
input[type="email"],
input[type="number"] {
  width: 100%;
  background: var(--bg-3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn-primary {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--accent), #15803d);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px var(--accent-glow); }

/* ── Toast Notification ──────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-2);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 0.875rem;
  font-weight: 500;
  min-width: 260px;
  animation: slideIn 0.3s ease;
}
.toast.success { border-color: rgba(22,163,74,0.4); }
.toast.error   { border-color: rgba(239,68,68,0.4); }
.toast-icon { font-size: 1.1rem; }
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── Live indicator ──────────────────────────────────────── */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-light);
  background: rgba(22,163,74,0.1);
  border: 1px solid rgba(22,163,74,0.2);
  padding: 3px 10px;
  border-radius: 999px;
}
.live-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-light);
  border-radius: 50%;
  animation: blink 1.5s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* ── Dashboard Specifics ─────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto 32px;
}
.dash-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.dash-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.dash-card-icon.green  { background: rgba(22,163,74,0.15); }
.dash-card-icon.blue   { background: rgba(59,130,246,0.15); }
.dash-card-icon.amber  { background: rgba(245,158,11,0.15); }
.dash-card-icon.purple { background: rgba(168,85,247,0.15); }
.dash-card-value { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.04em; }
.dash-card-label { font-size: 0.78rem; color: var(--text-dim); margin-top: 2px; }

.chart-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}
.chart-card h3 { margin-bottom: 20px; color: var(--text); }

.watchlist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.watchlist-table th {
  text-align: left;
  padding: 10px 16px;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}
.watchlist-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.watchlist-table tr:last-child td { border-bottom: none; }
.watchlist-table tr:hover td { background: var(--glass); }
.btn-remove {
  background: none;
  border: 1px solid rgba(239,68,68,0.3);
  color: var(--red);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-remove:hover { background: rgba(239,68,68,0.1); }

.scan-log-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.scan-log-item:last-child { border-bottom: none; }
.scan-status {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.scan-status.done   { background: var(--accent-light); }
.scan-status.failed { background: var(--red); }
.scan-status.running { background: var(--amber); animation: blink 1s infinite; }

.btn-scan-now {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: rgba(22,163,74,0.12);
  border: 1px solid rgba(22,163,74,0.3);
  border-radius: var(--radius-sm);
  color: var(--accent-light);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-scan-now:hover { background: rgba(22,163,74,0.2); }
.btn-scan-now:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero { padding: 40px 16px 32px; }
  .product-grid { grid-template-columns: 1fr; }
  .stats-bar { gap: 16px; }
  .card-actions { opacity: 1; }
  .nav-links .nav-link span { display: none; }
}

/* ── Pagination ──────────────────────────────────────────── */
.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-muted);
}
.pagination-btn:hover {
  background: var(--glass-hover);
  color: var(--text);
  border-color: var(--border-hover);
}
.pagination-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  cursor: default;
}
.pagination-btn:disabled {
  background: none;
  color: var(--text-dim);
  cursor: default;
  opacity: 0.4;
  border-color: var(--border);
}

/* ── Angebots-Radar & Prognosen ──────────────────────────── */
.radar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.radar-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.radar-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.radar-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.radar-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.radar-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.radar-badge-green {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.radar-badge-yellow {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.radar-badge-blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.radar-badge-gray {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.radar-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--bg);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.radar-metric-item {
  display: flex;
  flex-direction: column;
}
.radar-metric-label {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
}
.radar-metric-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.radar-recommendation {
  background: rgba(255,255,255,0.03);
  border-left: 3px solid var(--accent);
  padding: 8px 12px;
  border-radius: 0 8px 8px 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.radar-recommendation.due {
  border-left-color: var(--amber);
  background: rgba(245, 158, 11, 0.05);
}
.radar-recommendation.active {
  border-left-color: var(--accent);
  background: rgba(34, 197, 94, 0.05);
}
.radar-chip {
  padding: 5px 11px;
  font-size: 0.78rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  font-weight: 500;
}
.radar-chip:hover {
  background: var(--glass-hover);
  color: var(--text);
  border-color: var(--border-hover);
}
.radar-chip.active {
  background: var(--accent-glow);
  color: var(--accent-light);
  border-color: var(--accent);
}

/* ── Scan Progress Indicator ── */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.store-scan-chip {
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  transition: all 0.25s ease;
}

.store-scan-chip.active {
  background: var(--accent-glow);
  color: var(--accent-light);
  border-color: var(--accent);
  font-weight: 600;
}

.store-scan-chip.done {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.3);
}

.btn-chart-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--glass-hover);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--accent-light);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}
.btn-chart-link:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* ── Logo Branding ── */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo-icon {
  font-size: 1.35rem;
  line-height: 1;
}
.logo-text {
  font-weight: 800;
  display: inline-flex;
  align-items: center;
}
.logo-accent {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

/* ── PLZ / Standort Selector in Navbar ── */
.zip-selector-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.85rem;
  color: var(--text);
  transition: all 0.2s ease;
}
.zip-selector-nav:hover, .zip-selector-nav:focus-within {
  background: var(--glass-hover);
  border-color: var(--accent);
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.2);
}
.zip-pin {
  font-size: 0.95rem;
  flex-shrink: 0;
}
.zip-nav-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.nav-zip-input {
  background: transparent;
  border: none;
  color: var(--accent-light);
  font-weight: 700;
  font-size: 0.92rem;
  width: 54px;
  font-family: inherit;
  padding: 2px 2px;
  text-align: center;
  border-bottom: 1.5px dashed rgba(168, 85, 247, 0.6);
  outline: none;
  cursor: text;
  transition: all 0.15s ease;
}
.nav-zip-input:focus {
  border-bottom: 2px solid var(--accent);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
.nav-city-name {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.zip-edit-trigger {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 8px;
  margin-left: 2px;
  transition: all 0.15s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
}
.zip-edit-trigger:hover {
  color: var(--text);
  background: var(--accent);
  border-color: var(--accent);
}

/* ── Hero Search Standort Input ── */
.search-zip-box {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 10px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.search-zip-box:focus-within {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}
.search-zip-pin {
  font-size: 0.95rem;
}
.hero-zip-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  width: 95px;
  font-family: inherit;
}
.hero-zip-input::placeholder {
  color: var(--text-dim);
}
.search-zip-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0 2px;
  transition: color 0.15s;
}
.search-zip-btn:hover {
  color: var(--text);
}
@media (max-width: 680px) {
  .search-bar {
    flex-wrap: wrap;
    padding: 8px 12px;
    gap: 8px;
  }
  .search-zip-box {
    width: 100%;
    order: 2;
  }
  .hero-zip-input {
    flex: 1;
  }
  .search-btn {
    width: 100%;
    order: 3;
    justify-content: center;
  }
}

/* ── Clickable KPI Cards & Highlighting ── */
.dash-card.clickable {
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.dash-card.clickable:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
}
.dash-card.active-filter {
  border-color: #f59e0b !important;
  background: rgba(245, 158, 11, 0.08) !important;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.22) !important;
}
.filter-tab-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 5px 11px;
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-tab-btn:hover {
  background: var(--glass-hover);
  color: var(--text);
}
.filter-tab-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 600;
}
.filter-tab-btn.active-amber {
  background: #f59e0b !important;
  color: #0f172a !important;
  font-weight: 700 !important;
  border-color: #f59e0b !important;
}
.alarm-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 1px 6px;
  border-radius: 4px;
  vertical-align: middle;
}
@keyframes highlightPulse {
  0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7); }
  50% { box-shadow: 0 0 0 10px rgba(99, 102, 241, 0.2); }
  100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}
.highlight-pulse {
  animation: highlightPulse 1.5s ease-out;
  border-color: var(--accent) !important;
}

/* ── Card Zip Badge ── */
.card-zip-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ── Region Quick Select Chips in Modal ── */
.region-chip {
  padding: 6px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.region-chip:hover {
  background: var(--glass-hover);
  color: var(--text);
  border-color: var(--accent);
}
.region-chip.active {
  background: var(--accent-glow);
  color: var(--accent-light);
  border-color: var(--accent);
  font-weight: 600;
}
