:root {
  --bg: #faf8f6;
  --panel: #ffffff;
  --text: #1f2933;
  --muted: #6b7280;
  --accent: #d97706;
  --accent-light: #fb923c;
  --accent-dark: #b45309;
  --border: #f3e8e1;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(217, 119, 6, 0.1);
  --glow: rgba(217, 119, 6, 0.3);
}

body[data-theme="dark"] {
  --bg: #1a0f0a;
  --panel: #2d1810;
  --text: #f5e6d3;
  --muted: #c49a6f;
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --accent-dark: #d97706;
  --border: #4a2f1f;
  --shadow: 0 10px 30px rgba(245, 158, 11, 0.2);
  --glow: rgba(245, 158, 11, 0.4);
}

* {
  box-sizing: border-box;
  font-family: "Segoe UI", system-ui, sans-serif;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--accent);
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s ease;
  cursor: pointer;
}

.logo-link:hover {
  opacity: 0.8;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-logo {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.brand-logo:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.35);
}

.top-nav {
  display: flex;
  gap: 10px;
  margin-right: 8px;
}

.top-nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.top-nav a:hover,
.top-nav a[aria-current="page"] {
  background: rgba(37,99,235,0.1);
  color: var(--accent);
}

/* Glasmorphism with glow effect */

.card {
  background: rgba(255,255,255,0.65);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card:hover {
  box-shadow: 0 0 25px var(--glow), var(--shadow);
  transform: translateY(-2px);
}

body[data-theme="dark"] .card {
  background: rgba(45,24,16,0.85);
  border: 1px solid rgba(245,158,11,0.15);
}

body[data-theme="dark"] .card:hover {
  background: rgba(45,24,16,0.95);
}

/* Scroll reveal animations */
.text-center {
  text-align: center;
}

.mt-2rem {
  margin-top: 2rem;
}

.mt-28 {
  margin-top: 28px;
}

.mt-40 {
  margin-top: 40px;
}

.panel-callout {
  margin-top: 28px;
  padding: 16px;
  background: rgba(37, 99, 235, 0.08);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.inline-block {
  display: inline-block;
}

.muted {
  color: var(--muted);
}

.reveal-lift {
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.reveal-lift:hover {
  transform: translateY(-2px);
}

.page-loaded > header,
.page-loaded > .topbar,
.page-loaded > main,
.page-loaded > footer {
  opacity: 1;
  transform: none;
  filter: none;
}

body:not(.page-loaded) > header,
body:not(.page-loaded) > .topbar,
body:not(.page-loaded) > main,
body:not(.page-loaded) > footer {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(8px);
}

.page-loaded > header,
.page-loaded > .topbar,
.page-loaded > main,
.page-loaded > footer {
  transition:
    opacity 750ms ease,
    transform 950ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 750ms ease;
}

.scroll-reveal {
  opacity: 0;
  transform: translateY(calc(var(--reveal-y, 44px) + var(--hero-drift, 0px) + var(--hero-shift, 0px))) scale(var(--reveal-scale, 0.965));
  filter: blur(var(--reveal-blur, 8px)) saturate(0.92);
  will-change: opacity, transform, filter;
  transition:
    opacity var(--reveal-duration, 1100ms) ease,
    transform var(--reveal-duration, 1100ms) cubic-bezier(0.16, 1, 0.3, 1),
    filter var(--reveal-duration, 1100ms) ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0) saturate(1);
}

.parallax-drift {
  will-change: transform;
  transition: transform 180ms linear;
}

.footer-reveal {
  position: relative;
  overflow: hidden;
}

.footer-reveal::before {
  content: '';
  position: absolute;
  inset: -20px 0 auto;
  height: 80px;
  background: linear-gradient(180deg, rgba(0,0,0,0.08), transparent);
  pointer-events: none;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 900ms ease, transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
}

.footer-reveal.is-visible::before {
  opacity: 1;
  transform: translateY(0);
}

.footer-reveal .footer-section,
.footer-reveal .footer-bottom,
.footer-reveal .footer-logo {
  transition-delay: calc(var(--reveal-delay, 0ms) + 120ms);
}

.reveal-media {
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  filter: blur(4px);
  will-change: opacity, transform, filter;
  transition:
    opacity 760ms ease,
    transform 900ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 760ms ease;
  transition-delay: var(--media-delay, 0ms);
}

.scroll-reveal.is-visible .reveal-media,
.reveal-media.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.depth-reveal {
  box-shadow: 0 14px 35px rgba(0,0,0,0.05);
}

.depth-reveal.is-visible {
  box-shadow: 0 18px 50px rgba(0,0,0,0.08);
}

.footer-reveal.is-visible .footer-section,
.footer-reveal.is-visible .footer-bottom,
.footer-reveal.is-visible .footer-logo {
  animation: footerLift 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes footerLift {
  from {
    opacity: 0;
    transform: translateY(26px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  body:not(.page-loaded) > header,
  body:not(.page-loaded) > .topbar,
  body:not(.page-loaded) > main,
  body:not(.page-loaded) > footer,
  .scroll-reveal {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}

/* ------------------ Topbar ------------------ */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: margin-left 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.menu-open .topbar {
  margin-left: 250px;
}

body.menu-open main {
  margin-left: 250px;
  transition: margin-left 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.menu-open footer {
  margin-left: 250px;
  transition: margin-left 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand h1 {
  margin: 0;
  font-size: 20px;
}

.brand-sub {
  font-size: 13px;
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.header-socials {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 2px;
}

.header-socials a {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.header-socials a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(217, 119, 6, 0.1);
}

/* Font Awesome fallback for X icon */
.fa-x-twitter::before {
  content: "\f099";
  font-family: "Font Awesome 6 Brands";
  font-weight: 400;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34,197,94,0.6);
  animation: statusPulse 1.4s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 8px rgba(34,197,94,0.5);
  }
  50% {
    transform: scale(1.4);
    opacity: 0.55;
    box-shadow: 0 0 18px rgba(34,197,94,0.85);
  }
}

/* ------------------ Layout ------------------ */

.app-container {
  max-width: 1400px;
  margin: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.landing-wrap {
  max-width: 100%;
  margin: 28px auto;
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.landing-wrap .card {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Home page spacing refinements */
.home-page .landing-wrap {
  gap: 24px;
}

.home-page .sensor-preview {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px;
}

.home-page .features-grid {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.home-page .quick-links {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 26px;
}

.hero {
  padding: 28px;
}

.hero-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 4vw, 36px);
}

.hero p {
  color: var(--muted);
  margin: 0;
}

.hero-actions {
  margin-top: 22px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.launch-btn,
.ghost-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
}

.launch-btn {
  background: var(--accent);
  color: #fff;
}

.launch-btn,
.ghost-btn,
.select-plan,
.theme-toggle {
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease,
    border-color 220ms ease,
    color 220ms ease;
}

.launch-btn:hover,
.ghost-btn:hover,
.select-plan:hover,
.theme-toggle:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--panel);
}

.quick-links h3,
.info-card h2,
.info-card h3 {
  margin-top: 0;
}

.quick-links ul,
.info-card ul {
  margin: 0;
  padding-left: 18px;
}

.quick-links li,
.info-card li {
  margin: 8px 0;
}

.info-card {
  padding: 24px;
  transition: all 0.3s ease;
}

.classification-index-card {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 16px;
}

.classification-index-card h3 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.classification-index-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.classification-index-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--panel-2);
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

a.classification-index-pill:hover,
a.classification-index-pill:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.16);
  transform: translateY(-1px);
  outline: none;
}

.classification-index-pill.is-current {
  border-color: var(--accent);
  color: #fff;
  background: linear-gradient(135deg, #fb923c, #f97316);
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.18);
  cursor: default;
}

/* Classification page theming */
.info-page[class*="classification-"] {
  --class-accent: #f97316;
  --class-accent-soft: rgba(249, 115, 22, 0.2);
}

body.info-page.classification-good-page {
  --class-accent: #22c55e;
  --class-accent-soft: rgba(34, 197, 94, 0.2);
}

body.info-page.classification-moderate-page {
  --class-accent: #eab308;
  --class-accent-soft: rgba(234, 179, 8, 0.22);
}

body.info-page.classification-caution-page {
  --class-accent: #f97316;
  --class-accent-soft: rgba(249, 115, 22, 0.2);
}

body.info-page.classification-unhealthy-page {
  --class-accent: #ef4444;
  --class-accent-soft: rgba(239, 68, 68, 0.2);
}

body.info-page.classification-very-unhealthy-page {
  --class-accent: #a855f7;
  --class-accent-soft: rgba(168, 85, 247, 0.2);
}

body.info-page.classification-hazardous-page {
  --class-accent: #7e0023;
  --class-accent-soft: rgba(126, 0, 35, 0.24);
}

.info-page[class*="classification-"] .landing-wrap {
  background: radial-gradient(circle at 10% -20%, var(--class-accent-soft), transparent 52%),
              radial-gradient(circle at 110% 0%, var(--class-accent-soft), transparent 42%);
  border-radius: 16px;
  padding-top: 16px;
  padding-bottom: 16px;
}

/* ====================================
   Scroll Animations (per-page)
   ==================================== */

[data-scroll-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .55s cubic-bezier(.22,1,.36,1), transform .55s cubic-bezier(.22,1,.36,1);
}

[data-scroll-animate].is-in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Fade from left */
[data-scroll-fade-left] {
  transform: translateX(-40px);
}

[data-scroll-fade-left].is-in-view {
  transform: translateX(0);
}

/* Fade from right */
[data-scroll-fade-right] {
  transform: translateX(40px);
}

[data-scroll-fade-right].is-in-view {
  transform: translateX(0);
}

/* Scale in */
[data-scroll-scale-in] {
  transform: scale(.9);
}

[data-scroll-scale-in].is-in-view {
  transform: scale(1);
}

/* Staggered children (for grids) */
[data-scroll-stagger] > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .5s cubic-bezier(.22,1,.36,1), transform .5s cubic-bezier(.22,1,.36,1);
}

[data-scroll-stagger].is-in-view > *:nth-child(1) { transition-delay: .05s; opacity:1; transform:none; }
[data-scroll-stagger].is-in-view > *:nth-child(2) { transition-delay: .12s; opacity:1; transform:none; }
[data-scroll-stagger].is-in-view > *:nth-child(3) { transition-delay: .19s; opacity:1; transform:none; }
[data-scroll-stagger].is-in-view > *:nth-child(4) { transition-delay: .26s; opacity:1; transform:none; }
[data-scroll-stagger].is-in-view > *:nth-child(5) { transition-delay: .33s; opacity:1; transform:none; }
[data-scroll-stagger].is-in-view > *:nth-child(6) { transition-delay: .40s; opacity:1; transform:none; }
[data-scroll-stagger].is-in-view > *:nth-child(7) { transition-delay: .47s; opacity:1; transform:none; }
[data-scroll-stagger].is-in-view > *:nth-child(8) { transition-delay: .54s; opacity:1; transform:none; }

/* Dark mode friendly overrides */
body[data-theme="dark"] [data-scroll-animate] {
  box-shadow: none;
}

/* Hero specific animations */
.hero[data-scroll-hero-fade-up] {
  transform: translateY(30px);
}

.hero[data-scroll-hero-fade-up].is-in-view {
  transform: translateY(0);
}

body[data-theme="dark"] .card.is-in-view {
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.15);
}

.info-page[class*="classification-"] .landing-wrap {
  background: radial-gradient(circle at 10% -20%, var(--class-accent-soft), transparent 52%),
              radial-gradient(circle at 110% 0%, var(--class-accent-soft), transparent 42%);
  border-radius: 16px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.info-page[class*="classification-"] .info-card {
  border: 1px solid var(--class-accent);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.info-page[class*="classification-"] .info-card h2 {
  color: var(--class-accent);
}

.info-page[class*="classification-"] .classification-index-card {
  border: 1px solid var(--class-accent);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

/* Switcher links correspond to their target classification color */
a.classification-index-pill[href*="classification-good.html"] {
  border-color: #22c55e55;
  color: #16a34a;
  background: rgba(34, 197, 94, 0.12);
}

a.classification-index-pill[href*="classification-moderate.html"] {
  border-color: #eab30866;
  color: #ca8a04;
  background: rgba(234, 179, 8, 0.14);
}

a.classification-index-pill[href*="classification-caution.html"] {
  border-color: #f9731666;
  color: #ea580c;
  background: rgba(249, 115, 22, 0.14);
}

a.classification-index-pill[href*="classification-unhealthy.html"] {
  border-color: #ef444466;
  color: #dc2626;
  background: rgba(239, 68, 68, 0.14);
}

a.classification-index-pill[href*="classification-very-unhealthy.html"] {
  border-color: #a855f766;
  color: #9333ea;
  background: rgba(168, 85, 247, 0.14);
}

a.classification-index-pill[href*="classification-hazardous.html"] {
  border-color: #7e002366;
  color: #7e0023;
  background: rgba(126, 0, 35, 0.12);
}

body.classification-good-page .classification-index-pill.is-current {
  background: linear-gradient(135deg, #34d399, #16a34a);
  border-color: #16a34a;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

body.classification-moderate-page .classification-index-pill.is-current {
  background: linear-gradient(135deg, #fde047, #eab308);
  border-color: #ca8a04;
  color: #1f2937;
  box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.24);
}

body.classification-caution-page .classification-index-pill.is-current {
  background: linear-gradient(135deg, #fb923c, #f97316);
  border-color: #ea580c;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.22);
}

body.classification-unhealthy-page .classification-index-pill.is-current {
  background: linear-gradient(135deg, #f87171, #ef4444);
  border-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.22);
}

body.classification-very-unhealthy-page .classification-index-pill.is-current {
  background: linear-gradient(135deg, #c084fc, #a855f7);
  border-color: #9333ea;
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.24);
}

body.classification-hazardous-page .classification-index-pill.is-current {
  background: linear-gradient(135deg, #9f1239, #7e0023);
  border-color: #5f001a;
  box-shadow: 0 0 0 2px rgba(126, 0, 35, 0.28);
}

.back-to-map-wrap {
  margin: 0 0 14px;
}

.back-to-map-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease, color 0.2s ease;
}

.back-to-map-link i {
  color: var(--accent);
  font-size: 12px;
}

.back-to-map-link:hover,
.back-to-map-link:focus-visible {
  border-color: var(--accent);
  color: var(--accent-strong);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.16);
  transform: translateY(-1px);
  outline: none;
}

.info-card:hover {
  box-shadow: 0 0 30px var(--glow);
  transform: translateY(-2px);
}

/* ------------------ Controls ------------------ */

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  position: relative;
  z-index: 800;
}

.controls-left label {
  font-size: 13px;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}

select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.12);
}

select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.18);
}

/* Search box */
#searchBox,
#sensorSearchBox {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  min-width: 180px;
  font-family: inherit;
  font-size: 14px;
}

#sensorSearchBox {
  margin-left: auto;
}

/* ------------------ Toggles ------------------ */

.controls-toggles {
  display: flex;
  gap: 20px;
}

.controls-toggles label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.controls-toggles input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent);
}

.controls-buttons .btn-secondary.is-active {
  background: rgba(20, 184, 166, 0.14);
  border-color: rgba(20, 184, 166, 0.45);
  color: var(--text);
}

.controls-left select.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.switch-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.switch {
  position: relative;
  width: 46px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.2s;
}

.slider:before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.2s;
}

.switch input:checked + .slider {
  background: var(--accent);
}

.switch input:checked + .slider:before {
  transform: translateX(22px);
}

/* ------------------ Side Navigation ------------------ */

.side-nav {
  position: fixed;
  left: -250px;
  top: 0;
  width: 250px;
  height: 100vh;
  background: var(--panel);
  border-right: 1px solid var(--border);
  z-index: 999;
  transition: left 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 0;
  overflow-y: auto;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.1);
}

.side-nav.open {
  left: 0;
}

.side-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.side-nav-header h3 {
  margin: 0;
  color: var(--accent);
  font-size: 20px;
}

.side-nav-close {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  font-size: 22px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border-radius: 6px;
}

.side-nav-close:hover {
  background: rgba(217, 119, 6, 0.1);
  color: var(--accent);
}

.side-nav-close {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  font-size: 22px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border-radius: 6px;
}

.side-nav-close:hover {
  background: rgba(217, 119, 6, 0.1);
  color: var(--accent);
}

.side-nav-content {
  padding: 0;
  display: flex;
  flex-direction: column;
}

.side-nav-content a {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
  font-size: 15px;
  font-weight: 500;
}

.side-nav-content a:hover {
  background: rgba(217, 119, 6, 0.1);
  border-left-color: var(--accent);
  color: var(--accent);
  padding-left: 26px;
}

.side-nav-content a i {
  width: 20px;
  text-align: center;
  color: var(--accent);
  font-size: 16px;
}

.side-nav-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 16px;
}

.side-nav-toggle {
  position: fixed;
  left: 20px;
  top: 130px;
  z-index: 1001;
  width: 48px;
  height: 48px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--panel);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.side-nav-toggle:hover {
  background: rgba(217, 119, 6, 0.1);
  color: var(--accent);
  transform: scale(1.1);
}

.side-nav-toggle i {
  transition: all 0.3s ease;
}

/* ------------------ Theme Toggle Button (Industry Standard) ------------------ */

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: var(--text);
}

.theme-toggle:hover {
  background: rgba(37,99,235,0.1);
  transform: scale(1.1) rotate(20deg);
  color: var(--accent);
}

.theme-toggle:active {
  transform: scale(0.95);
}

/* ------------------ Buttons (with enhanced animations) ------------------ */

button {
  padding: 9px 14px;
  border-radius: 10px;
  border: none;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-weight: 500;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

button:hover::before {
  width: 300px;
  height: 300px;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
}

.btn-primary:hover {
  filter: brightness(1.1);
  color: white;
}

/* ------------------ Grid ------------------ */

.content-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 16px;
  align-items: start;
}

.map-card {
  padding: 0;
  overflow: hidden;
  align-self: start;
}

#map {
  height: 620px;
  width: 100%;
  position: relative;
  background: linear-gradient(135deg, #f8f4f0 0%, #faf8f6 50%, #f5f0ea 100%);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(217, 119, 6, 0.12);
}

body[data-theme="dark"] #map {
  background: linear-gradient(135deg, #1a0f0a 0%, #251810 50%, #1f1309 100%);
}

body[data-theme="dark"] #map .leaflet-tile-pane {
  filter: invert(0.93) hue-rotate(180deg) saturate(0.8);
  opacity: 0.87;
}

/* Leaflet Controls Theming */
.leaflet-control-zoom {
  border: none !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.2) !important;
  background: linear-gradient(135deg, var(--panel) 0%, rgba(255, 255, 255, 0.95) 100%) !important;
}

body[data-theme="dark"] .leaflet-control-zoom {
  background: linear-gradient(135deg, var(--panel) 0%, rgba(45, 24, 16, 0.9) 100%) !important;
}

.leaflet-control-zoom a {
  background: transparent !important;
  color: var(--accent) !important;
  border: 1px solid rgba(217, 119, 6, 0.3) !important;
  font-weight: 600 !important;
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
  transition: all 0.2s ease !important;
}

.leaflet-control-zoom a:hover {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.9) 0%, rgba(217, 119, 6, 0.9) 100%) !important;
  color: #fff !important;
  border-color: var(--accent) !important;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3) !important;
}

.leaflet-control-zoom a.leaflet-disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

/* Attribution Styling */
.leaflet-control-attribution {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(250, 248, 246, 0.85) 100%) !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  padding: 6px 10px !important;
  font-size: 11px !important;
  -webkit-backdrop-filter: blur(4px) !important;
  backdrop-filter: blur(4px) !important;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.08) !important;
}

body[data-theme="dark"] .leaflet-control-attribution {
  background: linear-gradient(135deg, rgba(45, 24, 16, 0.95) 0%, rgba(26, 15, 10, 0.95) 100%) !important;
  border-color: rgba(74, 47, 31, 0.6) !important;
}

.leaflet-control-attribution a {
  color: var(--accent) !important;
  text-decoration: none !important;
}

.leaflet-control-attribution a:hover {
  text-decoration: underline !important;
}

/* Popup Styling */
.leaflet-popup-content-wrapper {
  background: linear-gradient(135deg, var(--panel) 0%, rgba(255, 255, 255, 0.98) 100%) !important;
  border: 2px solid var(--accent-light) !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(217, 119, 6, 0.25) !important;
}

body[data-theme="dark"] .leaflet-popup-content-wrapper {
  background: linear-gradient(135deg, var(--panel) 0%, rgba(45, 24, 16, 0.95) 100%) !important;
}

.leaflet-popup-content {
  color: var(--text) !important;
  font-size: 14px !important;
}

.leaflet-popup-tip {
  background: var(--panel) !important;
  border-color: var(--accent-light) !important;
}

#overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 650;
}

/* Map Legend */
.map-legend {
  background: linear-gradient(135deg, var(--panel) 0%, rgba(255, 255, 255, 0.95) 100%);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 8px 24px rgba(217, 119, 6, 0.15);
  font-size: 13px;
  min-width: 150px;
}

body[data-theme="dark"] .map-legend {
  background: linear-gradient(135deg, var(--panel) 0%, rgba(45, 24, 16, 0.95) 100%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.legend-heading {
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  cursor: pointer;
  border-radius: 8px;
  transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.legend-item:hover {
  opacity: 0.8;
  transform: translateX(2px);
}

.map-legend.is-filtering .legend-item {
  opacity: 0.42;
}

.map-legend.is-filtering .legend-item.is-active {
  opacity: 1;
  background: rgba(217, 119, 6, 0.14);
  padding-left: 6px;
}

.legend-color {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.legend-label {
  color: var(--text);
  white-space: nowrap;
}

.legend-learn-more {
  margin-left: auto;
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
  opacity: 0.92;
}

.legend-learn-more:hover {
  text-decoration: underline;
}

/* Sidebar */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  height: auto;
  overflow-y: auto;
}

#stations {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

#stationSummary {
  font-size: 14px;
}

.station-summary {
  display: grid;
  gap: 6px;
}

.station-summary-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 2px;
}

.summary-row {
  display: grid;
  grid-template-columns: 1fr 110px;
  align-items: center;
  gap: 12px;
}

.summary-value {
  min-width: 110px;
  text-align: right;
  font-weight: 600;
}

.summary-current {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px dashed var(--border);
}

.summary-chart-wrap {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  height: 210px;
  display: block;
}

.summary-chart-wrap canvas {
  width: 100% !important;
  max-height: 200px;
  height: 200px !important;
  display: block;
}

/* Station rows */
.station-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
.summary-row.summary-address {
  grid-template-columns: 1fr;
  align-items: start;
}
.summary-row.summary-address .summary-address-value {
  text-align: left;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  word-break: break-word;
}
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  position: relative;
}

.sensor-detail-value.address-value {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  word-break: break-word;
}
.station-row:hover {
  background: rgba(37,99,235,0.08);
  transform: translateY(-1px);
}
body.add-mode #addPoint {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.25), 0 0 18px rgba(217, 119, 6, 0.45);
  transform: translateY(-1px);
}
body.add-mode #addPoint::before {
  background: rgba(217, 119, 6, 0.25);
}
body.add-mode .map-card {
  outline: 2px dashed var(--accent);
  outline-offset: 4px;
}
body.add-mode #map {
  cursor: crosshair;
}

.station-row .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

/* AQI badges */
.badge {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: white;
}

/* ------------------ Legend ------------------ */

.legend {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

#legend:empty {
  display: none;
}

/* ------------------ Expandable Sensor List ------------------ */

.sensor-list-container {
  margin-top: 16px;
}

.sensor-list-container h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
  color: var(--accent);
}

.expandable-sensor-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.expandable-sensor-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.sensor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  cursor: pointer;
  background: var(--bg);
  transition: background 0.2s ease;
}

.sensor-header:hover {
  background: rgba(217, 119, 6, 0.05);
}

.sensor-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.sensor-status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sensor-name-group {
  flex: 1;
}

.sensor-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 2px;
}

.sensor-id {
  font-size: 12px;
  color: var(--muted);
}

.sensor-quick-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 8px;
}

.sensor-quick-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 54px;
}

.sensor-quick-stat-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sensor-quick-stat-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.sensor-expand-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--muted);
  transition: transform 0.3s ease;
}

.expandable-sensor-item.expanded .sensor-expand-icon {
  transform: rotate(180deg);
}

.sensor-details {
  height: 0;
  overflow: hidden;
  transition: height 0.3s ease;
}

.sensor-details-content {
  padding: 18px 20px;
  border-top: 1px solid var(--border);
  background: var(--panel);
}

.sensor-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 20px;
  margin-bottom: 16px;
}

.sensor-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sensor-detail-item.status-merged {
  grid-column: 1 / -1;
  gap: 8px;
}

.sensor-status-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.sensor-detail-item.metric-inline {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel-2) 70%, transparent);
}

.sensor-detail-item.metric-inline .sensor-detail-value {
  white-space: nowrap;
  text-align: right;
}

.sensor-detail-item.sensor-metrics-cluster {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.sensor-metric-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel-2) 70%, transparent);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.sensor-metric-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sensor-metric-chip:active {
  transform: translateY(0);
}

/* ===========================
   Wildfire Detection System
   =========================== */

/* Wildfire Markers */
.wildfire-marker {
  z-index: 1000 !important;
}

.wildfire-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 26px;
  animation: wildfire-bounce 2s ease-in-out infinite;
}

/* Severity-based colors */
.wildfire-icon.watch {
  color: #eab308;
  filter: drop-shadow(0 0 8px rgba(234, 179, 8, 0.5));
}

.wildfire-icon.warning {
  color: #f97316;
  filter: drop-shadow(0 0 10px rgba(249, 115, 22, 0.6));
}

.wildfire-icon.critical {
  color: #ef4444;
  filter: drop-shadow(0 0 14px rgba(239, 68, 68, 0.8));
  animation: wildfire-bounce 1.2s ease-in-out infinite, wildfire-urgent 0.4s ease-in-out infinite alternate;
}

/* Status overrides */
.wildfire-icon.possible {
  opacity: 0.9;
}

.wildfire-icon.confirmed {
  opacity: 1;
  filter: drop-shadow(0 0 16px currentColor);
}

/* Confidence badge on marker */
.wildfire-confidence {
  position: absolute;
  bottom: -6px;
  right: -8px;
  background: var(--panel);
  color: var(--text);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 4px;
  border-radius: 4px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
}

.wildfire-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.4) 0%, transparent 70%);
  animation: wildfire-pulse 2s ease-out infinite;
}

.wildfire-icon.watch .wildfire-pulse {
  background: radial-gradient(circle, rgba(234, 179, 8, 0.4) 0%, transparent 70%);
}

.wildfire-icon.critical .wildfire-pulse {
  background: radial-gradient(circle, rgba(239, 68, 68, 0.5) 0%, transparent 70%);
  animation: wildfire-pulse 1.2s ease-out infinite;
}

@keyframes wildfire-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes wildfire-urgent {
  from { transform: scale(1); }
  to { transform: scale(1.2); }
}

@keyframes wildfire-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.8);
    opacity: 0;
  }
}

/* Wildfire Popup */
.wildfire-popup-container .leaflet-popup-content-wrapper {
  background: var(--panel);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  padding: 0;
}

.wildfire-popup {
  min-width: 280px;
}

.wildfire-popup-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
}

.wildfire-popup-header i {
  font-size: 20px;
}

.wildfire-popup-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wildfire-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.wildfire-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid;
  white-space: nowrap;
}

.wildfire-badge i {
  font-size: 11px;
}

.wildfire-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.wildfire-stat span {
  color: var(--muted);
}

.wildfire-stat strong {
  color: var(--text);
  font-weight: 600;
}

.wildfire-popup-actions {
  display: flex;
  gap: 8px;
  padding: 16px;
  border-top: 1px solid var(--border);
}

.wildfire-action-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.wildfire-action-btn.confirm {
  background: #22c55e;
  color: white;
}

.wildfire-action-btn.confirm:hover {
  background: #16a34a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.wildfire-action-btn.dismiss {
  background: var(--border);
  color: var(--text);
}

.wildfire-action-btn.dismiss:hover {
  background: var(--muted);
  color: white;
  transform: translateY(-1px);
}

/* Wildfire Notifications */
.wildfire-notifications {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  pointer-events: none;
}

.wildfire-notification {
  background: var(--panel);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.3s ease;
  border-left: 4px solid #f97316;
  animation: wildfire-notification-slide 0.4s ease;
}

/* Severity-based notification colors */
.wildfire-notification.watch {
  border-left-color: #eab308;
}

.wildfire-notification.warning {
  border-left-color: #f97316;
}

.wildfire-notification.critical {
  border-left-color: #ef4444;
  animation: wildfire-notification-slide 0.4s ease, wildfire-notification-urgent 2s ease-in-out infinite;
}

/* Action-based notification colors */
.wildfire-notification.confirmed {
  border-left-color: #22c55e;
}

.wildfire-notification.escalated {
  border-left-color: #ef4444;
  background: linear-gradient(to right, rgba(239, 68, 68, 0.05), var(--panel));
}

.wildfire-notification:hover {
  transform: translateX(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

@keyframes wildfire-notification-slide {
  from {
    transform: translateX(120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes wildfire-notification-urgent {
  0%, 100% {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  }
  50% {
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
  }
}

.wildfire-notification-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
}

.wildfire-notification-content i {
  font-size: 20px;
  margin-top: 2px;
}

.wildfire-notification.watch i {
  color: #eab308;
}

.wildfire-notification.warning i,
.wildfire-notification.detected i {
  color: #f97316;
}

.wildfire-notification.critical i {
  color: #ef4444;
}

.wildfire-notification.confirmed i {
  color: #22c55e;
}

.wildfire-notification.escalated i {
  color: #ef4444;
}

.wildfire-notification-content strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.wildfire-notification-content p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.wildfire-notification-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.wildfire-notification-close:hover {
  background: var(--border);
  color: var(--text);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .wildfire-notifications {
    top: 60px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .wildfire-notification {
    font-size: 13px;
  }
}

/* ===========================
   API Configuration Modal
   =========================== */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-content {
  background: var(--panel);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modal-slide-up 0.3s ease;
}

@keyframes modal-slide-up {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header i {
  color: var(--accent);
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--border);
  color: var(--text);
}

.modal-body {
  padding: 24px;
}

.api-config-intro {
  background: var(--border);
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
}

.api-config-intro i {
  color: var(--accent);
  margin-top: 2px;
}

.api-config-section {
  background: var(--bg);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.api-config-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.api-config-header input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.api-config-header label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin: 0;
  font-size: 15px;
}

.api-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.api-badge.recommended {
  background: #22c55e;
  color: white;
}

.api-badge:not(.recommended) {
  background: var(--border);
  color: var(--muted);
}

.api-config-desc {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 12px 28px;
}

.api-key-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
  font-family: 'Courier New', monospace;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.api-key-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

.api-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  margin-left: 28px;
  transition: all 0.2s ease;
}

.api-link:hover {
  color: var(--accent-light);
  gap: 8px;
}

.api-config-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.api-config-actions button {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.btn-secondary {
  background: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--muted);
  color: white;
}

.api-config-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.api-config-note i {
  color: #22c55e;
  margin-top: 2px;
}

.api-config-note small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .modal-content {
    max-height: 95vh;
  }
  
  .modal-header,
  .modal-body {
    padding: 16px;
  }
  
  .api-config-actions {
    flex-direction: column;
  }
}

.sensor-metric-chip .sensor-detail-label {
  white-space: nowrap;
}

.sensor-metric-chip .sensor-detail-value {
  white-space: nowrap;
  text-align: right;
}

.sensor-detail-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sensor-detail-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.sensor-quick-stat-value.is-online,
.sensor-detail-value.is-online {
  color: #22c55e;
}

.sensor-quick-stat-value.is-offline,
.sensor-detail-value.is-offline {
  color: #ef4444;
}

.sensor-online-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sensor-online-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.06);
}

.sensor-online-dot.is-online {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.55);
}

.sensor-online-dot.is-offline {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.sensor-classification-description {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--muted);
}

.classification-learn-more {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.classification-learn-more:hover {
  text-decoration: underline;
}

.summary-learn-more {
  justify-self: end;
}

.sensor-graph-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 8px;
}

.sensor-graph-controls label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sensor-graph-select {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

/* ------------------ Custom Dropdown ------------------ */

.custom-select {
  position: relative;
  display: inline-block;
  min-width: 180px;
  font-weight: 600;
  z-index: 900;
}

.custom-select.native-hidden {
  display: inline-block;
}

.custom-select-trigger {
  width: 100%;
  padding: 10px 38px 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.12);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.custom-select-trigger::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-50%) rotate(45deg);
  transition: transform 0.2s ease;
}

.custom-select.open .custom-select-trigger::after {
  transform: translateY(-50%) rotate(-135deg);
}

.custom-select-trigger:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.2);
  transform: translateY(-1px);
}

.custom-select-options {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  padding: 6px;
  display: none;
  z-index: 2000;
  max-height: 260px;
  overflow-y: auto;
}

.custom-select-options::-webkit-scrollbar,
.sensor-readings-panel::-webkit-scrollbar {
  width: 8px;
}

.custom-select-options::-webkit-scrollbar-thumb,
.sensor-readings-panel::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.5);
  border-radius: 999px;
}

.custom-select.open .custom-select-options {
  display: block;
}

.custom-select-option {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.custom-select-option:hover,
.custom-select-option[aria-selected="true"] {
  background: rgba(217, 119, 6, 0.12);
  color: var(--accent);
}

.custom-select-native {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

body[data-theme="dark"] .custom-select-trigger {
  background: var(--panel);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.2);
}

.custom-select.is-disabled {
  opacity: 0.6;
  pointer-events: none;
}

.custom-select.is-disabled .custom-select-trigger {
  cursor: not-allowed;
}

.sensor-function-description {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
  max-width: 560px;
}

.sensor-readings-dropdown {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  overflow: hidden;
}

.sensor-readings-dropdown > summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}

.sensor-readings-dropdown > summary::-webkit-details-marker {
  display: none;
}

.sensor-readings-summary-hint {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sensor-readings-panel {
  max-height: 250px;
  overflow-y: auto;
  padding: 0 12px 12px;
  display: grid;
  gap: 10px;
}

.sensor-readings-panel {
  touch-action: auto;
}

.sensor-reading-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
}

.sensor-reading-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.sensor-reading-label {
  font-weight: 700;
}

.sensor-reading-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

/* Small UX styles for summary interactivity and locate control */
.summary-row.metric-hidden { opacity: 0.5; }
.leaflet-control-userloc a { display:flex; align-items:center; justify-content:center; width:32px; height:32px; font-size:14px; }

.station-summary-title {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

/* Smoothing toggle */
.smooth-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.smooth-toggle:hover { transform: translateY(-1px); border-color: var(--accent); }
.smooth-toggle.active { background: var(--accent); color:#fff; border-color: var(--accent-dark); box-shadow: 0 6px 16px rgba(217,119,6,0.22); }
.smooth-toggle-label { letter-spacing: 0.02em; }
.smooth-toggle-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  font-size: 11px;
  font-weight: 800;
}
.smooth-toggle-state.is-off {
  background: rgba(107,114,128,0.14);
  color: var(--muted);
}
.smooth-toggle.active .smooth-toggle-state {
  background: rgba(255,255,255,0.22);
  color: #fff;
}

/* Pin button */
.pin-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.pin-btn:hover { transform: translateY(-1px); border-color: var(--accent); }
.pin-btn-icon { font-size: 13px; }
.pin-btn.pinned {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent-dark);
  box-shadow: 0 6px 16px rgba(217,119,6,0.22);
}
.pin-btn.pinned .pin-btn-icon { filter: brightness(1.15); }

.summary-controls { display:flex; align-items:center; gap:8px; }
.summary-key { font-weight:700; }
.summary-value { font-weight:700; }

.sensor-reading-value {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
}

.sensor-reading-description {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.summary-section-title {
  margin-top: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.sensor-chart-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.sensor-chart-container {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  min-height: 190px;
  position: relative;
}

.sensor-chart-container h4 {
  margin: 0 0 8px 0;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .sensor-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .sensor-detail-item.sensor-metrics-cluster {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .sensor-details-content {
    padding: 14px;
  }

  .sensor-detail-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .sensor-detail-item.sensor-metrics-cluster {
    grid-template-columns: 1fr;
  }
}

.sensor-chart-container canvas {
  max-height: 150px !important;
  height: 150px !important;
  width: 100% !important;
}

.sensor-chart-container.chart-large {
  min-height: 290px;
}

.sensor-chart-container.chart-large canvas {
  max-height: 240px !important;
  height: 240px !important;
}

.sensor-chart-container.chart-mini {
  min-height: 190px;
}

.sensor-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.sensor-action-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sensor-action-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.sensor-action-btn i {
  margin-right: 6px;
}

/* ------------------ Extras ------------------ */

.extras {
  display: flex;
  gap: 12px;
}

.file-btn {
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px dashed var(--border);
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
}

/* ------------------ Remote Device Controls ------------------ */

.remote-config {
  display: grid;
  gap: 16px;
}

.remote-config-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.remote-config-header h3 {
  margin: 0;
}

.remote-config-status {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(148, 163, 184, 0.14);
  color: var(--muted);
}

.remote-config-status[data-state="success"] {
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
}

.remote-config-status[data-state="error"] {
  background: rgba(239, 68, 68, 0.14);
  color: #dc2626;
}

.remote-config-status[data-state="info"] {
  background: rgba(37, 99, 235, 0.14);
  color: #2563eb;
}

.remote-config-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.remote-field {
  display: grid;
  gap: 6px;
}

.remote-field label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.remote-field input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font: inherit;
}

.remote-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.16);
}

.remote-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 85%, transparent);
}

.remote-flags label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

.remote-flags input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.remote-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

@media (max-width: 680px) {
  .remote-config-header,
  .remote-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .remote-config-grid {
    grid-template-columns: 1fr;
  }
}

/* ------------------ Loading Skeleton ------------------ */

.loading {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 16px;
}

.skeleton {
  border-radius: 14px;
  background: linear-gradient(90deg, #eee, #f5f5f5, #eee);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}

.skeleton.map { height: 620px; }
.skeleton.side { height: 620px; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ------------------ Live Pulse Animation ------------------ */

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.9; }
  70% { transform: scale(1.6); opacity: 0; }
  100% { opacity: 0; }
}

.sensor-pulse {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: pulse 2.2s infinite;
}

/* ------------------ Footer ------------------ */

.footer {
  background: var(--panel);
  border-top: 1px solid var(--border);
  padding: 32px 28px;
  margin-top: 40px;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

.footer-section h4 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--text);
}

.footer-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-section li {
  margin: 6px 0;
}

.footer-section a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s ease;
}

.footer-section a:hover {
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  max-width: 1400px;
  margin: 0 auto;
}

.footer-contact {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  font-size: 12px;
}

.footer-contact span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.footer-contact i {
  color: var(--accent);
}

.footer-socials {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.footer-socials a {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--muted);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.footer-socials a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(217, 119, 6, 0.1);
  transform: translateY(-1px);
}

/* Search Widget */
.search-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.search-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(217,119,6,0.3);
  transition: all 0.3s ease;
}

.search-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(217,119,6,0.4);
}

.search-box {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 300px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  animation: slideUp 0.3s ease;
}

.search-box.hidden {
  display: none;
}

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

.search-box input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  background: var(--panel);
  margin-bottom: 12px;
}

.search-results {
  max-height: 300px;
  overflow-y: auto;
}

.search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.search-result-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-result-title {
  font-weight: 600;
}

.search-result-snippet {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.search-result-snippet mark {
  background: rgba(217, 119, 6, 0.2);
  color: var(--text);
  padding: 0 2px;
  border-radius: 4px;
}

.search-result:hover {
  background: rgba(217,119,6,0.1);
  color: var(--accent);
  transform: translateX(4px);
}

.search-result i {
  color: var(--accent);
}

.no-results {
  padding: 10px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.search-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
}

/* Google Translate Widget */
#google_translate_element {
  margin: 10px 0;
}

.goog-te-gadget {
  font-family: "Segoe UI", system-ui, sans-serif !important;
}

/* Footer Logo */
.footer-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-logo-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s ease;
}

.footer-logo-link:hover {
  opacity: 0.8;
  transform: translateY(-4px);
}

.footer-brand-logo {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.footer-brand-logo:hover {
  transform: scale(1.05) rotate(5deg);
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.4);
}

.footer-logo h4 {
  margin: 0;
  color: var(--accent);
}

.footer-logo-link h4 {
  margin: 0;
  color: var(--accent);
}

.footer-logo p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.footer-logo-link p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

/* Footer Logo */
.footer-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-logo h4 {
  margin: 0;
  color: var(--accent);
}

.footer-logo p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

/* Sensor Preview Section */
.sensor-preview {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.08), rgba(245, 158, 11, 0.04));
  border: 2px solid var(--accent);
  text-align: center;
  margin: 30px 0;
}

.sensor-preview h2 {
  color: var(--accent);
  margin-top: 0;
  font-size: 28px;
}

.sensor-preview > p {
  color: var(--muted);
  margin-bottom: 24px;
}

.sensor-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.sensor-card {
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.sensor-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 0 30px var(--glow);
  border-color: var(--accent);
}

.sensor-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transition: all 0.3s ease;
}

.sensor-card:hover .sensor-icon {
  transform: scale(1.2) rotate(-10deg);
}

.sensor-icon.aqi-high {
  background: rgba(220, 38, 38, 0.15);
  color: #dc2626;
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
}

.sensor-icon.pm-high {
  background: rgba(251, 146, 60, 0.15);
  color: #fb923c;
  box-shadow: 0 0 20px rgba(251, 146, 60, 0.3);
}

.sensor-icon.co2-normal {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

.sensor-icon.sensors-active {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.sensor-card h4 {
  margin: 12px 0 8px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.sensor-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  margin: 8px 0;
}

.sensor-status {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.explore-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--accent), #f59e0b);
  color: white;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.3);
}

.explore-btn:hover {
  transform: translateX(6px);
  box-shadow: 0 8px 28px rgba(217, 119, 6, 0.5);
}

.explore-btn i {
  margin-left: 6px;
}

@media (max-width: 600px) {
  .sensor-preview-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .explore-btn {
    width: 100%;
    text-align: center;
  }
}

/* Home Page Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 40px 0;
}

.feature-card {
  text-align: center;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 32px rgba(217, 119, 6, 0.2);
}

.feature-card i {
  font-size: 40px;
  color: var(--accent);
  transition: all 0.3s ease;
}

.feature-card:hover i {
  transform: scale(1.2) rotate(10deg);
  filter: drop-shadow(0 0 10px rgba(217, 119, 6, 0.5));
}

.feature-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* Stats Section */
.stats-section {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.05), rgba(217, 119, 6, 0.02));
  padding: 40px;
  margin: 40px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.stat {
  text-align: center;
  padding: 20px;
  background: var(--panel);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.stat:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.2);
  border-color: var(--accent);
}

.stat-number {
  font-size: 28px;
  font-weight: bold;
  color: var(--accent);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Quick Links with Icons */
.quick-links ul li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.quick-links ul li a:hover {
  background: rgba(217, 119, 6, 0.1);
  color: var(--accent);
  transform: translateX(6px);
}

.quick-links ul li a i {
  color: var(--accent);
  min-width: 20px;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin: 40px 0;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 900px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
}

.pricing-tier {
  padding: 24px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  cursor: pointer;
  margin-top: 30px;
}

.pricing-tier:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 30px var(--glow), 0 15px 40px rgba(0,0,0,0.1);
  border-color: var(--accent);
}

.pricing-tier.featured {
  border: 2px solid var(--accent);
  transform: scale(1.05);
  box-shadow: 0 0 25px var(--glow);
}

.pricing-tier.featured:hover {
  transform: scale(1.05) translateY(-4px);
  box-shadow: 0 0 40px var(--glow), 0 20px 50px rgba(0,0,0,0.15);
}

.pricing-tier h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--text);
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  border: 2px solid var(--panel);
}

.price {
  margin: 12px 0;
  font-size: 32px;
  font-weight: 700;
}

.price span {
  font-size: 14px;
  color: var(--muted);
  font-weight: 400;
}

.select-plan {
  width: 100%;
  padding: 10px 16px;
  margin: 16px 0;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.select-plan:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.select-plan.selected {
  background: var(--accent);
  animation: glow-pulse 2s ease-in-out infinite;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(217, 119, 6, 0.6), 0 0 40px rgba(217, 119, 6, 0.4);
}

@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(217, 119, 6, 0.6), 0 0 40px rgba(217, 119, 6, 0.4);
  }
  50% {
    box-shadow: 0 0 30px rgba(217, 119, 6, 0.8), 0 0 60px rgba(217, 119, 6, 0.6);
  }
}

.features-list {
  margin: 16px 0;
  padding: 0;
  list-style: none;
}

.features-list li {
  padding: 8px 0;
  font-size: 13px;
  color: var(--text);
}

.features-list i {
  color: var(--accent);
  margin-right: 8px;
  width: 14px;
}

.features-list i.fa-times {
  color: var(--muted);
}

.product-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin: 30px 0;
  align-items: center;
}

@media (max-width: 900px) {
  .product-showcase {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

.product-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 30px var(--glow);
}

.product-image img {
  width: 100%;
  height: auto;
  display: block;
}

.product-info h3 {
  margin-top: 0;
  font-size: 20px;
}

.product-info ul {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.product-info li {
  padding: 8px 0;
  color: var(--text);
}

.product-info i {
  color: var(--accent);
  margin-right: 10px;
}

.comparison-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid var(--border);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.comparison-table th,
.comparison-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.comparison-table th {
  background: rgba(217,119,6,0.1);
  font-weight: 600;
  color: var(--accent-dark);
}

.comparison-table tr:hover {
  background: rgba(217,119,6,0.05);
}

.comparison-table i {
  font-size: 16px;
  color: var(--accent);
}

.comparison-table i.fa-times {
  color: var(--muted);
}

/* ------------------ Responsive ------------------ */

@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .side-nav-toggle {
    display: flex;
  }

  .topbar {
    align-items: flex-start;
    gap: 10px;
    flex-direction: row;
    padding-left: 52px;
  }

  .topbar-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
    width: auto;
  }

  .top-nav {
    display: none;
  }

  .landing-wrap {
    grid-template-columns: 1fr;
    margin-top: 18px;
  }

  #map {
    height: 420px;
  }

  .sidebar {
    position: relative;
    top: auto;
  }

  .loading {
    grid-template-columns: 1fr;
  }
}

/* Chatbot Widget Styles */
.chatbot-widget {
  position: fixed;
  bottom: 90px;
  right: 20px;
  z-index: 999;
  font-family: system-ui, -apple-system, sans-serif;
}

.chatbot-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 24px;
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s ease;
}

.chatbot-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(217, 119, 6, 0.4);
}

.unread-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ef4444;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.unread-badge.show {
  display: flex;
}

.chatbot-container {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 380px;
  height: 500px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

.chatbot-container.hidden {
  display: none;
}

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

.chatbot-header {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.chatbot-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.chatbot-close:hover {
  transform: rotate(90deg);
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message {
  display: flex;
  margin-bottom: 8px;
  animation: fadeIn 0.3s ease;
}

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

.message p {
  margin: 0;
  padding: 10px 14px;
  border-radius: 8px;
  max-width: 80%;
  word-wrap: break-word;
  font-size: 14px;
  line-height: 1.4;
}

.user-message {
  justify-content: flex-end;
}

.user-message p {
  background: var(--accent);
  color: white;
}

.bot-message {
  justify-content: flex-start;
}

.bot-message p {
  background: rgba(217, 119, 6, 0.1);
  color: var(--text);
  border: 1px solid var(--border);
}

.chatbot-input {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
  background: var(--panel);
}

.chatbot-input input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
}

.chatbot-input input::placeholder {
  color: var(--muted);
}

.chatbot-send {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--accent);
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.chatbot-send:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

/* Responsive chatbot */
@media (max-width: 600px) {
  .chatbot-widget {
    bottom: 20px;
    right: 20px;
  }

  .chatbot-toggle {
    width: 56px;
    height: 56px;
    font-size: 20px;
  }

  .chatbot-container {
    width: 320px;
    height: 450px;
    bottom: 70px;
  }

  .message p {
    max-width: 90%;
  }
}

/* Sample Questions Styling */
.sample-questions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  background: rgba(217, 119, 6, 0.02);
}

.sample-q-btn {
  padding: 10px 12px;
  background: rgba(217, 119, 6, 0.1);
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
  font-family: inherit;
  text-align: left;
}

.sample-q-btn:hover {
  background: rgba(217, 119, 6, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.2);
}

.sample-q-btn:active {
  transform: translateY(0);
}

@media (max-width: 600px) {
  .sample-questions {
    grid-template-columns: 1fr;
  }
}

/* =====================================
   CONTACT FORM STYLES
   ===================================== */

.contact-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  margin-top: 2rem;
}

@media (max-width: 968px) {
  .contact-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.contact-form-section,
.contact-info-section {
  background: var(--panel);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.contact-form-section h3,
.contact-info-section h3 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  font-size: 1.5rem;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.5rem;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.form-group label i {
  color: var(--accent);
  width: 18px;
}

.required {
  color: var(--danger, #ef4444);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-primary);
  font-family: inherit;
  transition: all 0.3s ease;
  outline: none;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

.form-group input.valid,
.form-group select.valid,
.form-group textarea.valid {
  border-color: var(--success, #10b981);
}

.form-group input.invalid,
.form-group select.invalid,
.form-group textarea.invalid {
  border-color: var(--danger, #ef4444);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
  max-height: 400px;
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-group button[type="submit"] {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), #f59e0b);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.form-group button[type="submit"]:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.4);
}

.form-group button[type="submit"]:active:not(:disabled) {
  transform: translateY(0);
}

.form-group button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Form Status Messages */
.form-status {
  padding: 1rem;
  border-radius: var(--radius);
  font-weight: 500;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: slideDown 0.3s ease;
}

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

.form-status.hidden {
  display: none;
}

.form-status.success {
  background: rgba(16, 185, 129, 0.1);
  border: 2px solid #10b981;
  color: #10b981;
}

.form-status.error {
  background: rgba(239, 68, 68, 0.1);
  border: 2px solid #ef4444;
  color: #ef4444;
}

.form-status.info {
  background: rgba(59, 130, 246, 0.1);
  border: 2px solid #3b82f6;
  color: #3b82f6;
}

/* Contact Info Section */
.contact-info-section {
  height: fit-content;
}

.contact-info-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.contact-info-item:hover {
  border-color: var(--accent);
  transform: translateX(5px);
}

.contact-info-item > i {
  font-size: 1.5rem;
  color: var(--accent);
  min-width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-info-item div {
  flex: 1;
}

.contact-info-item strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
  font-size: 1rem;
}

.contact-info-item p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.contact-info-item a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-info-item a:hover {
  color: #f59e0b;
  text-decoration: underline;
}

/* Quick Links */
.quick-links {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
}

.quick-links li {
  margin-bottom: 0.75rem;
}

.quick-links a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border-radius: var(--radius);
  color: var(--text-primary);
  text-decoration: none;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.quick-links a:hover {
  background: var(--panel);
  border-color: var(--accent);
  transform: translateX(5px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.quick-links a i {
  color: var(--accent);
  width: 20px;
  text-align: center;
}

/* Dark Mode Adjustments */
body[data-theme="dark"] .form-group input[type="text"],
body[data-theme="dark"] .form-group input[type="email"],
body[data-theme="dark"] .form-group select,
body[data-theme="dark"] .form-group textarea {
  background: #1f2937;
  color: #e5e7eb;
}

body[data-theme="dark"] .form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23aaa' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .contact-form-section,
  .contact-info-section {
    padding: 1.5rem;
  }

  .form-group button[type="submit"] {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }

  .contact-info-item {
    flex-direction: column;
    text-align: center;
  }

  .contact-info-item > i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }
}
