:root {
  --ife-primary: rgb(38, 186, 165);
  --ife-secondary: rgb(55, 95, 122);
  --surface: #f6f8fb;
  --text: #17324d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
  background: linear-gradient(135deg, #f7fbfd 0%, #eef4f8 100%);
  color: var(--text);
}

.app-shell {
  height: 100vh;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(55, 95, 122, 0.12);
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(23, 50, 77, 0.08);
  backdrop-filter: blur(8px);
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ife-secondary);
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(1.2rem, 2.2vw, 1.8rem);
}

.title-mobile {
  display: none;
}

.subtitle {
  margin: 8px 0 0;
  max-width: 760px;
  color: #4c6278;
}

.ife-logo {
  width: clamp(76px, 10vw, 110px);
  height: auto;
  opacity: 0.82;
  pointer-events: none;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.16));
}

.map-card {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(55, 95, 122, 0.12);
  box-shadow: 0 18px 40px rgba(23, 50, 77, 0.12);
}

#map {
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #ecf3f7;
}

.legend {
  position: absolute;
  z-index: 1000;
  left: 16px;
  bottom: 16px;
  display: flex;
  gap: 16px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(23, 50, 77, 0.12);
  backdrop-filter: blur(6px);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.primary {
  background: var(--ife-primary);
}

.legend-dot.secondary {
  background: var(--ife-secondary);
}

.leaflet-container {
  font-family: inherit;
}

.district-label {
  position: absolute;
  z-index: 900;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.92);
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.05;
  text-align: center;
  overflow-wrap: anywhere;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.9),
    0 0 12px rgba(0, 0, 0, 0.72),
    1px 1px 0 rgba(0, 0, 0, 0.9),
    -1px 1px 0 rgba(0, 0, 0, 0.9),
    1px -1px 0 rgba(0, 0, 0, 0.9),
    -1px -1px 0 rgba(0, 0, 0, 0.9);
  opacity: 0;
  transition: opacity 180ms ease, transform 220ms ease;
  will-change: transform, opacity;
}

.district-label.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 700px) {
  .app-shell {
    padding: 6px;
    gap: 6px;
  }

  .app-header {
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 12px;
  }

  .eyebrow,
  .subtitle {
    display: none;
  }

  h1 {
    font-size: clamp(1rem, 5vw, 1.35rem);
    line-height: 1.05;
  }

  .title-full {
    display: none;
  }

  .title-mobile {
    display: inline;
  }

  .ife-logo {
    width: clamp(50px, 14vw, 68px);
  }

  .map-card {
    border-radius: 14px;
  }

  .legend {
    display: none;
  }
}
