*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #09090b;
  --bg-elevated: #111114;
  --bg-card: #18181b;
  --surface: var(--bg-elevated);
  --line: rgba(255, 255, 255, 0.08);
  --border: var(--line);
  --text: #fafafa;
  --muted: #a1a1aa;
  --accent: #2dd4a8;
  --accent-2: #60a5fa;
  --danger: #f87171;
  --radius: 14px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --font: "Manrope", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --region-fill: rgba(79, 140, 255, 0.06);
  --region-stroke: rgba(79, 140, 255, 0.35);
  --region-hover: rgba(0, 229, 168, 0.12);

  --status-unknown: #94a3b8;
  --status-ok: #00e5a8;
  --status-temp-rare: #ffd166;
  --status-temp-frequent: #ff9f43;
  --status-permanent: #ff6b8a;

  /* Подложка карты - water из OpenFreeMap Dark (rgb 27,27,29) на малых зумах */
  --map-sea: #1b1b1d;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

html,
body {
  margin: 0;
  height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
}

body {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.bg-grid,
.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.bg-grid {
  background-image:
    linear-gradient(rgba(79, 140, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 140, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black, transparent 78%);
}

.bg-glow {
  background:
    radial-gradient(circle at 20% 10%, rgba(0, 229, 168, 0.12), transparent 28%),
    radial-gradient(circle at 80% 0%, rgba(79, 140, 255, 0.14), transparent 30%),
    radial-gradient(circle at 50% 80%, rgba(0, 229, 168, 0.06), transparent 35%);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.header {
  position: relative;
  z-index: 1000;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--map-sea) 88%, transparent);
  border-bottom: 1px solid var(--line);
}

.header__inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  padding: 0.7rem 1.25rem;
  min-height: 72px;
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex-shrink: 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.logo__mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #3b82f6);
  box-shadow: 0 0 20px rgba(0, 229, 168, 0.4);
  flex-shrink: 0;
}

.logo__text span {
  color: var(--accent);
}

.header__title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.08rem;
  min-width: 0;
}

.header__eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.header__tagline {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(42vw, 280px);
}

.nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 1.25rem;
  align-items: center;
  margin-left: auto;
}

.nav a {
  position: relative;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding-bottom: 0.35rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--accent);
}

.nav a.active {
  font-weight: 600;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.burger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  color: inherit;
  flex-shrink: 0;
}

.burger span {
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.open span:nth-child(2) {
  opacity: 0;
}

.burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.search {
  position: relative;
}

.search input {
  width: min(280px, 70vw);
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 11, 20, 0.65);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font);
}

.search input::placeholder {
  color: rgba(232, 238, 252, 0.92);
  opacity: 1;
}

.search input:focus {
  outline: 2px solid rgba(0, 229, 168, 0.35);
  outline-offset: 1px;
  border-color: rgba(0, 229, 168, 0.35);
}

.search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 14px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 1100;
  box-shadow: var(--shadow);
}

.search-results li button {
  display: block;
  width: 100%;
  padding: 0.45rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font-size: 0.85rem;
}

.search-results li button:hover,
.search-results li button:focus {
  background: rgba(0, 229, 168, 0.1);
}

.search-results .meta {
  color: var(--muted);
  font-size: 0.75rem;
}

.zoom-info {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

#map {
  width: 100%;
  height: 100%;
  min-height: 0;
  background: var(--map-sea);
  position: relative;
  z-index: 1;
}

#map .leaflet-container,
#map .leaflet-pane,
#map .leaflet-map-pane,
#map .leaflet-tile-pane,
#map .leaflet-overlay-pane {
  background: var(--map-sea) !important;
}

.legend {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  z-index: 1000;
  padding: 0.9rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  font-size: 0.8rem;
  max-width: 280px;
  box-shadow: var(--shadow);
}

.legend h2 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
}

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

.legend li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.legend__heat {
  margin: 0.5rem 0 0.35rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.legend__heat-bar {
  display: block;
  height: 8px;
  margin-top: 0.35rem;
  border-radius: 4px;
  background: linear-gradient(
    to right,
    #64748b,
    #22c55e,
    #eab308,
    #f97316,
    #ef4444
  );
}

.legend__report-btn {
  display: block;
  width: 100%;
  margin-top: 0.6rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 229, 168, 0.08);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.legend__report-btn:hover {
  border-color: rgba(0, 229, 168, 0.45);
  background: rgba(0, 229, 168, 0.14);
}

.legend__fill {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
  text-align: center;
}

.legend__note {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.legend__note a {
  color: var(--accent-2);
  text-decoration: none;
}

.legend__note a:hover {
  text-decoration: underline;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.dot--unknown { background: var(--status-unknown); }
.dot--ok { background: var(--status-ok); }
.dot--temp-rare { background: var(--status-temp-rare); }
.dot--temp-frequent { background: var(--status-temp-frequent); }
.dot--permanent { background: var(--status-permanent); }

.city-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2000;
  min-width: 260px;
  padding: 1rem 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.city-popup[hidden] {
  display: none;
}

.city-popup__close {
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.city-popup h3 {
  margin: 0 2rem 0.75rem 0;
  font-size: 1.05rem;
}

.city-popup dl {
  margin: 0;
  display: grid;
  gap: 0.4rem;
}

.city-popup dl > div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.5rem;
}

.city-popup dt {
  color: var(--muted);
  font-size: 0.8rem;
}

.city-popup dd {
  margin: 0;
  font-size: 0.85rem;
}

.city-popup__comment-row dd {
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  line-height: 1.35;
}

.popup-admin textarea {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  resize: vertical;
  min-height: 2.5rem;
}

.popup-admin textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.leaflet-control-zoom a {
  background: var(--surface) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

.leaflet-control-attribution {
  background: rgba(7, 11, 20, 0.82) !important;
  color: var(--muted) !important;
  font-size: 0.65rem !important;
}

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

.legend-toggle {
  display: none;
}

/* ── Mobile ───────────────────────────────────────────── */

@media (max-width: 768px) {
  .header__inner {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
    padding: 0.55rem 0.75rem;
    gap: 0.55rem 0.65rem;
  }

  .header__brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .header__tagline {
    display: none;
  }

  .burger {
    display: inline-flex;
    grid-column: 4;
    grid-row: 1;
  }

  .nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    margin-left: 0;
    background: color-mix(in srgb, var(--map-sea) 96%, transparent);
    border-bottom: 1px solid var(--line);
    border-radius: 0 0 14px 14px;
    overflow: hidden;
    padding: 0.5rem 1rem 1rem;
    z-index: 1001;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--line);
  }

  .nav a:last-child {
    border-bottom: none;
  }

  .header__actions {
    display: contents;
  }

  .search {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .search input {
    width: 100%;
    font-size: 16px;
    padding: 0.6rem 0.75rem;
  }

  .zoom-info {
    grid-column: 1 / -1;
    grid-row: 3;
    font-size: 0.75rem;
  }

  .admin-reports-toggle {
    grid-column: 2;
    grid-row: 1;
    min-height: 2.5rem;
    font-size: 0.78rem;
  }

  .admin-reports-toggle[hidden] {
    display: none;
  }

  .admin-toggle {
    grid-column: 3;
    grid-row: 1;
    min-height: 2.5rem;
    font-size: 0.78rem;
    max-width: 7.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .legend-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    right: 0.75rem;
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    z-index: 1002;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg-card);
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
  }

  .legend {
    left: 0;
    right: 0;
    bottom: 0;
    max-width: none;
    margin: 0;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
    padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
    max-height: min(72vh, 520px);
    overflow-y: auto;
    transform: translateY(110%);
    transition: transform 0.25s ease;
    pointer-events: none;
  }

  .legend.legend--open {
    transform: translateY(0);
    pointer-events: auto;
  }

  .legend h2 {
    font-size: 0.9rem;
  }

  .legend li {
    font-size: 0.78rem;
  }

  .legend__note {
    font-size: 0.7rem;
  }

  .city-popup,
  .region-popup {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    min-width: 0;
    max-width: none;
    border-radius: 16px 16px 0 0;
    max-height: min(75vh, 480px);
    overflow-y: auto;
    padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  }

  .city-popup dl > div {
    grid-template-columns: 6.5rem 1fr;
    gap: 0.35rem 0.5rem;
  }

  .report-dialog,
  .admin-login,
  .admin-reports {
    align-items: flex-end;
    padding: 0;
  }

  .report-dialog__panel,
  .admin-login__panel,
  .admin-reports__panel {
    width: 100%;
    max-width: none;
    border-radius: 16px 16px 0 0;
    max-height: 92vh;
    padding: 1.25rem 1rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  }

  .admin-reports__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .admin-reports__meta span {
    white-space: normal;
  }

  .admin-reports__actions button {
    flex: 1 1 auto;
    min-height: 2.5rem;
  }

  .leaflet-top.leaflet-left {
    top: auto;
    bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px));
    left: 0.5rem;
    right: auto;
  }

  .leaflet-control-zoom a {
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 1.1rem !important;
  }

  .leaflet-control-attribution {
    max-width: calc(100vw - 7rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 380px) {
  .header__tagline {
    font-size: 0.62rem;
  }

  .legend-toggle {
    right: 0.5rem;
    bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
    padding: 0.5rem 0.7rem;
    font-size: 0.75rem;
  }
}

@media (min-width: 769px) {
  .legend-toggle {
    display: none !important;
  }
}

.admin-toggle {
  border: 1px solid var(--line);
  background: rgba(7, 11, 20, 0.65);
  color: var(--text);
  min-height: 2.25rem;
  padding: 0.35rem 0.65rem;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
}

.admin-toggle:hover {
  border-color: rgba(0, 229, 168, 0.45);
}

.admin-toggle--active {
  border-color: rgba(0, 229, 168, 0.55);
  box-shadow: 0 0 0 2px rgba(0, 229, 168, 0.18);
}

.admin-login {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  padding: 1rem;
}

.admin-login[hidden] {
  display: none;
}

.admin-login__panel {
  position: relative;
  width: min(360px, 100%);
  padding: 1.25rem 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.admin-login__close {
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
  cursor: pointer;
}

.admin-login h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.admin-login p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.admin-login form {
  display: grid;
  gap: 0.6rem;
}

.admin-login label {
  font-size: 0.8rem;
  color: var(--muted);
}

.admin-login input {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}

.admin-login button[type="submit"] {
  margin-top: 0.25rem;
  padding: 0.6rem 0.85rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #19c4ff);
  color: #041018;
  font-weight: 700;
  cursor: pointer;
}

.admin-login__error,
.popup-admin__error {
  margin: 0;
  color: var(--danger);
  font-size: 0.8rem;
}

.popup-admin__success {
  margin: 0;
  color: var(--accent);
  font-size: 0.8rem;
}

.popup-admin {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 0.6rem;
}

.popup-admin[hidden] {
  display: none;
}

.popup-admin label {
  font-size: 0.8rem;
  color: var(--muted);
}

.popup-admin select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}

.popup-admin__save {
  padding: 0.55rem 0.85rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #19c4ff);
  color: #041018;
  font-weight: 700;
  cursor: pointer;
}

.popup-admin__save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.region-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2000;
  width: min(320px, 92vw);
  padding: 1rem 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.region-popup[hidden] {
  display: none;
}

.region-popup__close {
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
  cursor: pointer;
}

.region-popup h3 {
  margin: 0 2rem 0.5rem 0;
  font-size: 1.05rem;
}

.region-popup__intensity {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
}

.region-popup__stats {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
  font-size: 0.85rem;
}

.region-popup__stats li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.region-popup__total {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.report-dialog {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  padding: 1rem;
}

.report-dialog[hidden] {
  display: none;
}

.report-dialog__panel {
  position: relative;
  width: min(420px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.report-dialog__close {
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
  cursor: pointer;
}

.report-dialog h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.report-dialog p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.report-dialog form {
  display: grid;
  gap: 0.55rem;
}

.report-dialog label {
  font-size: 0.8rem;
  color: var(--muted);
}

.report-dialog input,
.report-dialog select,
.report-dialog textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
}

.report-dialog input.report-contact--locked,
.report-dialog input.report-contact--locked:focus {
  opacity: 0.85;
  cursor: not-allowed;
  background: color-mix(in srgb, var(--bg) 70%, var(--border));
  border-color: color-mix(in srgb, var(--border) 80%, var(--muted, #888));
  color: var(--muted, #aaa);
}

.report-dialog button[type="submit"] {
  margin-top: 0.25rem;
  padding: 0.6rem 0.85rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #19c4ff);
  color: #041018;
  font-weight: 700;
  cursor: pointer;
}

.report-city-search {
  position: relative;
}

.report-dialog__error {
  margin: 0;
  color: var(--danger);
  font-size: 0.8rem;
}

.report-dialog__hint {
  margin: 0.25rem 0 0;
  color: var(--muted, #888);
  font-size: 0.75rem;
  line-height: 1.35;
}

.report-dialog__success {
  margin: 0;
  color: var(--accent);
  font-size: 0.8rem;
}

.report-success-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1rem 2.5rem;
  min-height: 200px;
}

.report-success-screen[hidden] {
  display: none;
}

.report-success-screen__icon {
  margin: 0 0 1rem;
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 229, 168, 0.12);
  color: var(--accent);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
}

.report-success-screen__text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--text);
}

.admin-reports-toggle {
  border: 1px solid var(--line);
  background: rgba(7, 11, 20, 0.65);
  color: var(--text);
  min-height: 2.25rem;
  padding: 0.35rem 0.65rem;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
}

.admin-reports-toggle:hover {
  border-color: rgba(0, 229, 168, 0.45);
}

.admin-reports {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  padding: 1rem;
}

.admin-reports[hidden] {
  display: none;
}

.admin-reports__panel {
  position: relative;
  width: min(520px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.admin-reports__close {
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
  cursor: pointer;
}

.admin-reports h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.admin-reports__count {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.admin-reports__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.admin-reports__item {
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(7, 11, 20, 0.45);
}

.admin-reports__item--done {
  opacity: 0.65;
}

.admin-reports__meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.admin-reports__meta span {
  color: var(--muted);
  white-space: nowrap;
}

.admin-reports__status {
  margin-top: 0.35rem;
  color: var(--accent);
  font-size: 0.8rem;
}

.admin-reports__message {
  margin: 0.45rem 0 0;
  font-size: 0.85rem;
  line-height: 1.4;
}

.admin-reports__contact {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.admin-reports__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.admin-reports__actions button {
  padding: 0.4rem 0.65rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  cursor: pointer;
}

.admin-reports__dismiss {
  background: transparent !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

.admin-reports__apply-comment {
  background: #2563eb !important;
}

.admin-reports__empty {
  color: var(--muted);
  font-size: 0.85rem;
}

.admin-reports__backup {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-reports__clear-btn {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid #b45309;
  border-radius: 8px;
  background: transparent;
  color: #fbbf24;
  font-size: 0.85rem;
  cursor: pointer;
}

.admin-reports__clear-btn:hover:not(:disabled) {
  background: rgba(251, 191, 36, 0.08);
}

.admin-reports__clear-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.admin-reports__backup-btn {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
}

.admin-reports__backup-btn:hover:not(:disabled) {
  border-color: var(--accent);
}

.admin-reports__backup-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.admin-reports__backup-status {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}



/* Leaflet region/city hints - в стиле Lab */
.leaflet-tooltip.region-hint,
.leaflet-tooltip {
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(120, 160, 220, 0.28);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(22, 32, 52, 0.98) 0%, rgba(10, 16, 28, 0.98) 100%);
  color: #e8eefc;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  line-height: 1.4;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  white-space: normal;
}

.leaflet-tooltip.region-hint {
  min-width: 15.5rem;
  max-width: min(24rem, 92vw);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .leaflet-tooltip.region-hint {
    min-width: 0;
    white-space: normal;
  }
}

.leaflet-tooltip.region-hint::before,
.leaflet-tooltip-top:before {
  border-top-color: rgba(22, 32, 52, 0.98) !important;
}

.leaflet-tooltip-bottom:before {
  border-bottom-color: rgba(22, 32, 52, 0.98) !important;
}

.leaflet-tooltip-left:before {
  border-left-color: rgba(22, 32, 52, 0.98) !important;
}

.leaflet-tooltip-right:before {
  border-right-color: rgba(22, 32, 52, 0.98) !important;
}

.region-hint__name {
  display: block;
  font-weight: 600;
  color: #e8eefc;
  margin-bottom: 0.25rem;
}

.region-hint__meta {
  color: #93a0bd;
}

.region-hint__foot {
  margin-top: 0.35rem;
  color: #00e5a8;
  font-size: 0.68rem;
}
