:root {
  color-scheme: light dark;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 18% 20%, rgba(14, 165, 233, 0.18), transparent 30%),
    radial-gradient(circle at 82% 8%, rgba(251, 191, 36, 0.14), transparent 26%),
    radial-gradient(circle at 72% 76%, rgba(16, 185, 129, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(241, 245, 249, 0.96));
}

.dark .page-bg {
  background:
    radial-gradient(circle at 18% 20%, rgba(34, 211, 238, 0.14), transparent 28%),
    radial-gradient(circle at 82% 8%, rgba(251, 191, 36, 0.08), transparent 24%),
    radial-gradient(circle at 72% 76%, rgba(16, 185, 129, 0.09), transparent 28%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 1));
}

.glass-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
}

.dark .glass-card {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(71, 85, 105, 0.6);
}

.card-hover {
  position: relative;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background-color 0.22s ease;
  transform-origin: center;
  will-change: transform, box-shadow;
}

.card-hover::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid transparent;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(251, 191, 36, 0.12));
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}

.card-hover:hover,
.card-hover:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -26px rgba(15, 23, 42, 0.32);
  border-color: rgba(34, 211, 238, 0.18);
}

.card-hover:hover::before,
.card-hover:focus-within::before {
  opacity: 1;
}

.dark .card-hover:hover,
.dark .card-hover:focus-within {
  box-shadow: 0 24px 48px -28px rgba(2, 6, 23, 0.72);
  border-color: rgba(34, 211, 238, 0.24);
}

@media (prefers-reduced-motion: reduce) {
  .card-hover,
  .card-hover::before {
    transition: none;
  }

  .card-hover:hover,
  .card-hover:focus-within {
    transform: none;
  }
}

.input {
  width: 100%;
  border-radius: 0.8rem;
  border: 1px solid rgb(203 213 225);
  background: rgba(255, 255, 255, 0.95);
  padding: 0.64rem 0.8rem;
  font-size: 0.875rem;
}

.dark .input {
  border-color: rgb(51 65 85);
  background: rgba(30, 41, 59, 0.8);
}

.btn-primary,
.btn-ghost {
  border-radius: 0.8rem;
  padding: 0.58rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.btn-primary {
  background: linear-gradient(135deg, #0b5f8a, #0e9f6e);
  color: #fff;
}

.btn-ghost {
  border: 1px solid rgb(203 213 225);
  background: rgba(255, 255, 255, 0.82);
}

.dark .btn-ghost {
  border-color: rgb(71 85 105);
  background: rgba(15, 23, 42, 0.65);
}

.marker-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.35);
}

.marker-cheap {
  background: #16a34a;
}

.marker-average {
  background: #f59e0b;
}

.marker-expensive {
  background: #ef4444;
}

.popup-card {
  min-width: 220px;
}

.toast {
  background: rgba(15, 23, 42, 0.95);
  color: #fff;
  border-radius: 0.75rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.8rem;
  animation: fadeUp 0.25s ease-out;
}

.signal-card {
  position: relative;
  overflow: hidden;
}

.signal-card::after {
  content: '';
  position: absolute;
  inset: auto -20% -45% auto;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.16), transparent 70%);
  pointer-events: none;
}

.signal-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(248, 250, 252, 0.92);
  padding: 0.35rem 0.55rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #334155;
}

.dark .signal-pill {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.75);
  color: #e2e8f0;
}

.track-step {
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 0.92));
}

.dark .track-step {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.88));
}

.track-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(16, 185, 129, 0.16));
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.dark .track-step__num {
  color: #f8fafc;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(16, 185, 129, 0.18));
}

.community-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
}

.community-item__dot {
  width: 0.9rem;
  height: 0.9rem;
  margin-top: 0.45rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.12);
}

.community-input {
  width: 100%;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(248, 250, 252, 0.92);
  color: #0f172a;
  padding: 0.95rem 1rem;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.community-input::placeholder {
  color: #64748b;
}

.community-input:focus {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
  background: rgba(255, 255, 255, 1);
}

.market-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.24rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(248, 250, 252, 0.9);
  color: #64748b;
}

.market-glyph--cheap {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.18);
  color: #059669;
}

.market-glyph--expensive {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.18);
  color: #dc2626;
}

.market-glyph--average {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.22);
  color: #64748b;
}

.dark .market-glyph {
  background: rgba(15, 23, 42, 0.75);
  border-color: rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
}

.dark .market-glyph--cheap {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.dark .market-glyph--expensive {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.dark .community-input {
  background: rgba(15, 23, 42, 0.68);
  color: #f8fafc;
}

.dark .community-input:focus {
  background: rgba(15, 23, 42, 0.82);
}

.coverage-marquee {
  position: relative;
  overflow: hidden;
  padding: 1rem 0;
}

.coverage-marquee::before,
.coverage-marquee::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 72px;
  z-index: 2;
  pointer-events: none;
}

.coverage-marquee::before {
  left: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0));
}

.coverage-marquee::after {
  right: 0;
  background: linear-gradient(270deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0));
}

.dark .coverage-marquee::before {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0));
}

.dark .coverage-marquee::after {
  background: linear-gradient(270deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0));
}

.coverage-marquee__track {
  display: flex;
  width: max-content;
  animation: coverage-scroll 32s linear infinite;
}

.coverage-marquee__group {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-right: 1rem;
}

.coverage-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(248, 250, 252, 0.92);
  color: #475569;
  padding: 0.9rem 1.15rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  box-shadow: 0 12px 32px -24px rgba(15, 23, 42, 0.4);
}

.dark .coverage-pill {
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.88);
  color: #e2e8f0;
}

@keyframes coverage-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .coverage-marquee__track {
    animation: none;
  }
}

.admin-toolbar {
  box-shadow: 0 18px 48px -36px rgba(15, 23, 42, 0.5);
}

.admin-panel {
  box-shadow: 0 20px 48px -38px rgba(15, 23, 42, 0.5);
}

.admin-panel__body {
  max-height: min(70vh, 980px);
  overflow-y: auto;
  padding-right: 0.35rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
}

.admin-panel__body::-webkit-scrollbar {
  width: 9px;
}

.admin-panel__body::-webkit-scrollbar-track {
  background: transparent;
}

.admin-panel__body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.38);
}

.admin-inline-scroll {
  max-height: 88px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

.admin-inline-scroll::-webkit-scrollbar {
  width: 7px;
}

.admin-inline-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.32);
}

.dark .admin-panel__body::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.55);
}

.dark .admin-inline-scroll::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.48);
}

@media (max-width: 1279px) {
  .admin-panel__body {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
}

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

@media (max-width: 1023px) {
  #filtersPanel {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(92vw, 350px);
    max-height: 100vh;
    overflow-y: auto;
    transform: translateX(-108%);
    transition: transform 0.28s ease;
    z-index: 55;
    border-radius: 0;
  }

  #filtersPanel.is-open {
    transform: translateX(0);
  }
}
