:root {
  color-scheme: light;
  --ink: #0e1726;
  --muted: #647084;
  --line: #d8e0e8;
  --surface: #ffffff;
  --background: #f3f6f7;
  --accent: #35c2a1;
  --accent-dark: #12806c;
  --warning: #bf7b10;
  --blue: #2457a6;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--ink);
}

.topbar {
  height: 74px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand,
.brand-by a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  width: 262px;
  height: 52px;
  display: block;
}

.brand-by {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.datahouse-logo {
  width: 152px;
  max-width: 28vw;
  height: auto;
  display: block;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(420px, 52vw) minmax(420px, 48vw);
  min-height: calc(100vh - 74px);
}

.search-panel {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.panel-heading {
  display: grid;
  gap: 8px;
}

.kicker {
  margin: 0;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: 0;
}

.address-search {
  display: grid;
  gap: 10px;
}

.address-search label {
  font-size: 14px;
  font-weight: 700;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}

input,
button {
  font: inherit;
}

input {
  width: 100%;
  min-width: 0;
  border: 1px solid #b8c5d3;
  border-radius: 6px;
  padding: 12px 13px;
  color: var(--ink);
  background: #fff;
}

input:focus {
  outline: 3px solid rgba(53, 194, 161, 0.25);
  border-color: var(--accent-dark);
}

button {
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  min-height: 46px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: #1e2a3d;
}

.address-autocomplete {
  position: relative;
  min-width: 0;
}

.suggestions-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 50;
  display: grid;
  max-height: min(340px, 52vh);
  overflow: auto;
  border: 1px solid #b8c5d3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(14, 23, 38, 0.18);
}

.suggestions-list[hidden] {
  display: none;
}

.suggestion-item {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 0;
  padding: 11px 12px;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.suggestion-item:last-child {
  border-bottom: 0;
}

.suggestion-item:hover,
.suggestion-item.active {
  background: #eef8f6;
}

.suggestion-item strong {
  min-width: 0;
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.suggestion-item span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.result-box {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: grid;
  gap: 12px;
}

.datahouse-ad,
.partner-ad {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.partner-ad {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}

.datahouse-ad a,
.partner-ad a {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid #c7d5e1;
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--ink);
  text-decoration: none;
}

.datahouse-ad a:hover,
.partner-ad a:hover {
  border-color: var(--blue);
}

.datahouse-ad strong,
.partner-ad strong {
  font-size: 16px;
  line-height: 1.2;
}

.datahouse-ad span,
.partner-ad span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.datahouse-ad img,
.partner-ad img {
  width: 132px;
  max-width: 100%;
  height: auto;
  margin-top: 6px;
}

.partner-ad img {
  width: 118px;
}

.empty-state {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.status-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfcfd;
}

.status-card strong {
  display: block;
  margin-bottom: 6px;
}

.status-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.operators-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.operators-heading strong {
  font-size: 16px;
}

.operators-heading span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.operators-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  align-items: start;
  gap: 12px;
}

.operator-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.operator-title {
  display: grid;
  gap: 3px;
}

.operator-title strong {
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.operator-title span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.operator-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 0;
}

.operator-meta div {
  min-width: 0;
}

.operator-meta dt {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.operator-meta dd {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.operator-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.operator-contact span,
.operator-contact a {
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 6px;
  background: #eef4f8;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.operator-contact a {
  color: var(--blue);
  font-weight: 700;
}

.detail-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.detail-list div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.detail-list dt {
  color: var(--muted);
  font-size: 13px;
}

.detail-list dd {
  margin: 0;
  min-width: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e6f7f2;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
}

.status-chip.warning {
  background: #fff3d8;
  color: var(--warning);
}

.map-panel {
  position: relative;
  height: calc(100vh - 74px);
  min-height: 560px;
  overflow: hidden;
}

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

.leaflet-container {
  overflow: hidden;
}

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
  position: absolute;
  left: 0;
  top: 0;
}

.leaflet-container img.leaflet-tile,
.leaflet-container img.leaflet-marker-icon,
.leaflet-container img.leaflet-marker-shadow {
  max-width: none;
}

.leaflet-tile {
  user-select: none;
}

.leaflet-control {
  position: relative;
  z-index: 800;
  pointer-events: auto;
}

.leaflet-top,
.leaflet-bottom {
  position: absolute;
  z-index: 1000;
  pointer-events: none;
}

.leaflet-top {
  top: 0;
}

.leaflet-right {
  right: 0;
}

.leaflet-bottom {
  bottom: 0;
}

.leaflet-left {
  left: 0;
}

.leaflet-control-zoom {
  margin: 12px;
  border: 1px solid rgba(14, 23, 38, 0.18);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.leaflet-control-zoom a {
  display: block;
  width: 32px;
  height: 32px;
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  line-height: 30px;
  font-size: 21px;
  font-weight: 700;
  background: #fff;
}

.leaflet-control-zoom a + a {
  border-top: 1px solid var(--line);
}

.leaflet-popup {
  position: absolute;
  text-align: center;
}

.leaflet-popup-content-wrapper {
  padding: 1px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(14, 23, 38, 0.18);
}

.leaflet-popup-content {
  margin: 12px 16px;
  line-height: 1.35;
}

.leaflet-popup-tip-container {
  display: none;
}

.leaflet-control-attribution {
  margin: 0;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-size: 11px;
}

.address-pin {
  position: relative;
  width: 34px;
  height: 44px;
}

.address-pin::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 24px;
  height: 24px;
  border: 4px solid #0e1726;
  border-radius: 50% 50% 50% 0;
  background: #35c2a1;
  box-shadow: 0 8px 18px rgba(14, 23, 38, 0.28);
  transform: rotate(-45deg);
}

.address-pin::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45);
}

.address-pin span {
  position: absolute;
  left: 4px;
  bottom: 1px;
  width: 26px;
  height: 8px;
  border-radius: 50%;
  background: rgba(14, 23, 38, 0.2);
}

.map-note {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 10;
  max-width: min(420px, calc(100% - 32px));
  padding: 9px 12px;
  border: 1px solid rgba(14, 23, 38, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 860px) {
  .topbar {
    height: auto;
    min-height: 72px;
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    padding: 12px 18px;
  }

  .brand-logo {
    width: 222px;
    height: auto;
  }

  .datahouse-logo {
    width: 132px;
    max-width: 58vw;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .search-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 22px 18px;
  }

  h1 {
    font-size: 24px;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .operator-meta {
    grid-template-columns: 1fr;
  }

  #map {
    height: 58vh;
  }
}
