* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #1f2937; background: #f8fafc; }
body { display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; background: #ffffff; border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}
.logo { font-weight: 600; font-size: 16px; color: #0f766e; }
.legend { display: flex; gap: 14px; font-size: 13px; align-items: center; }
.legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; }
.dot--free     { background: #16a34a; }
.dot--reserved { background: #f59e0b; }
.dot--sold     { background: #ef4444; }

.layout { flex: 1; display: flex; min-height: 0; }
.sidebar {
  width: 320px; flex-shrink: 0; display: flex; flex-direction: column;
  border-right: 1px solid #e5e7eb; background: #ffffff;
}
.search {
  position: relative; padding: 10px 12px; border-bottom: 1px solid #e5e7eb;
}
.search input {
  width: 100%; padding: 8px 32px 8px 12px; border: 1px solid #d1d5db;
  border-radius: 8px; font-size: 13px; background: #f9fafb;
}
.search input:focus {
  outline: none; border-color: #0f766e; box-shadow: 0 0 0 2px rgba(15, 118, 110, .15);
  background: #fff;
}
.search button {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; border: 0; background: transparent;
  font-size: 18px; line-height: 1; color: #9ca3af; cursor: pointer;
}
.search button:hover { color: #4b5563; }

.results { flex: 1; overflow-y: auto; padding: 6px 0; }
.result {
  display: flex; gap: 10px; padding: 8px 14px; cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
}
.result:hover { background: #f9fafb; }
.result__dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  margin-top: 6px; background: #9ca3af;
}
.result__body { min-width: 0; flex: 1; }
.result__title {
  font-size: 13px; font-weight: 500; color: #111827;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.result__subtitle {
  font-size: 11px; color: #6b7280; margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.result--empty { padding: 20px 14px; text-align: center; color: #9ca3af; font-size: 12px; }

.map-canvas-wrap { flex: 1; position: relative; min-width: 0; }
.map-canvas { position: absolute; inset: 0; }

.status {
  position: absolute; left: 16px; bottom: 16px;
  background: rgba(255, 255, 255, .9); border: 1px solid #e5e7eb;
  padding: 8px 12px; border-radius: 8px; font-size: 13px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
}
.status[hidden] { display: none; }
.status.status--error { color: #b91c1c; }

/* --- Plot form inside Yandex balloon --- */
.plot-form {
  padding: 8px 4px 4px; max-width: 280px;
  font-family: inherit; color: inherit;
}
.plot-form h3 { font-size: 15px; margin-bottom: 6px; }
.plot-form .meta { font-size: 12px; color: #6b7280; margin-bottom: 10px; }
.plot-form input[type=text],
.plot-form input[type=tel] {
  width: 100%; padding: 8px 10px; margin-bottom: 8px;
  border: 1px solid #d1d5db; border-radius: 6px; font-size: 13px;
  background: #fff;
}
.plot-form input:focus { outline: none; border-color: #0f766e; box-shadow: 0 0 0 2px rgba(15, 118, 110, .15); }
.plot-form button {
  width: 100%; padding: 10px; background: #0f766e; color: #fff;
  border: 0; border-radius: 6px; font-size: 13px; font-weight: 500;
  cursor: pointer;
}
.plot-form button:hover { background: #0d6b62; }
.plot-form button:disabled { opacity: .6; cursor: wait; }
.plot-form .success { color: #16a34a; font-size: 13px; padding: 8px 0; text-align: center; }
.plot-form .error { color: #b91c1c; font-size: 12px; margin: 4px 0 8px; }

@media (max-width: 720px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; height: 240px; border-right: 0; border-bottom: 1px solid #e5e7eb; }
}
