:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #142033;
  --muted: #64748b;
  --line: #d8e2ef;
  --primary: #0f4c81;
  --primary-strong: #0b3a63;
  --primary-soft: #e7f0fa;
  --success: #087f5b;
  --success-soft: #e7fbf3;
  --warning: #b45309;
  --warning-soft: #fff7ed;
  --danger: #b42318;
  --danger-soft: #fff1f2;
  --shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.07);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --obera: #0f4c81;
  --posadas: #2f855a;
  --eldorado: #dd6b20;
  --iguazu: #6b46c1;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(15, 76, 129, 0.16), transparent 32%),
    radial-gradient(circle at 95% 5%, rgba(8, 127, 91, 0.12), transparent 28%),
    linear-gradient(180deg, #f7fafe 0%, var(--bg) 48%, #eef3f9 100%);
}

button,
input,
select {
  font-family: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(1240px, calc(100% - 28px));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 999;
  padding: 10px 14px;
  color: #fff;
  background: var(--primary);
  border-radius: 12px;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  padding: 12px 0;
  background: #ffffff;
  border-bottom: 1px solid rgba(216, 226, 239, 0.95);
  box-shadow: 0 5px 22px rgba(15, 23, 42, 0.07);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.brand-block:focus-visible {
  outline: 3px solid rgba(15, 76, 129, 0.22);
  outline-offset: 6px;
  border-radius: 12px;
}

.brand-logo {
  display: block;
  width: min(500px, 100%);
  height: auto;
  max-height: 86px;
  object-fit: contain;
  object-position: left center;
  background: #ffffff;
}

.admin-data-card {
  display: none !important;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  letter-spacing: -0.08em;
  background: linear-gradient(135deg, var(--primary), #1d6da3);
  box-shadow: 0 12px 30px rgba(15, 76, 129, 0.26);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--primary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-weight: 800;
}

.site-header h1 {
  margin: 0;
  font-size: clamp(18px, 2vw, 26px);
  letter-spacing: -0.04em;
}

.header-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.header-meta span,
.home-link {
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-strong);
  font-weight: 850;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.home-link:hover,
.home-link:focus-visible {
  color: #ffffff;
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.main-layout {
  padding: 24px 0 40px;
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(360px, 520px);
  gap: 26px;
  align-items: center;
  padding: 26px 30px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #0f4c81, #152d45 70%);
  color: #fff;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -155px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.hero-copy,
.search-panel {
  position: relative;
  z-index: 1;
}

.hero-card .eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

.hero-copy h2 {
  margin: 0;
  max-width: 560px;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.hero-copy p:not(.eyebrow) {
  max-width: 500px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  line-height: 1.48;
}

.search-panel {
  padding: 17px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  backdrop-filter: blur(12px);
}

.search-panel label {
  display: block;
  margin-bottom: 10px;
  font-weight: 800;
  color: #fff;
}

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

input[type="search"],
select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="search"]:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(15, 76, 129, 0.13);
}

.help-text {
  margin: 9px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12.5px;
  line-height: 1.4;
}

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

.chip {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 800;
}

.chip:hover,
.chip:focus {
  background: #fff;
  color: var(--primary);
}

.btn {
  min-height: 48px;
  border: 0;
  border-radius: 16px;
  padding: 0 17px;
  font-weight: 850;
  font-size: 14px;
  transition: transform 0.16s ease, filter 0.16s ease, background 0.16s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #1b75bb, #0f4c81);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2);
}

.btn-soft {
  color: var(--primary-strong);
  background: var(--primary-soft);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.8fr);
  gap: 18px;
  margin-top: 18px;
  align-items: stretch;
}

.card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
}

.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.card-heading.compact {
  margin-bottom: 8px;
}

.card-heading h2 {
  margin: 0;
  font-size: clamp(21px, 2vw, 28px);
  letter-spacing: -0.04em;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.badge-neutral {
  color: #475569;
  background: #edf2f7;
}

.badge-ok {
  color: var(--success);
  background: var(--success-soft);
}

.badge-warn {
  color: var(--warning);
  background: var(--warning-soft);
}

.badge-bad {
  color: var(--danger);
  background: var(--danger-soft);
}

.empty-state {
  padding: 17px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
  color: var(--muted);
}

.result-status {
  padding: 16px;
  border-radius: 18px;
  margin-bottom: 14px;
  line-height: 1.5;
  font-weight: 800;
}

.result-status.ok {
  color: var(--success);
  background: var(--success-soft);
}

.result-status.warn {
  color: var(--warning);
  background: var(--warning-soft);
}

.result-status.bad {
  color: var(--danger);
  background: var(--danger-soft);
}

.result-note {
  margin: 12px 0;
  padding: 13px;
  border-radius: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  line-height: 1.48;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.result-item {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.result-item span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 850;
}

.result-item strong {
  font-size: 15px;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.map-card {
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 14% 8%, rgba(15, 76, 129, 0.08), transparent 26%),
    radial-gradient(circle at 90% 12%, rgba(107, 70, 193, 0.08), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 45%, #f6f9fd 100%);
  border: 1px solid rgba(216, 226, 239, 0.95);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.10);
}

.map-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.45), transparent 24%);
}

.map-legend {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid rgba(216, 226, 239, 0.9);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(248,250,252,0.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(216, 226, 239, 0.95);
  background: #ffffff;
  color: #334155;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.9);
}

.map-wrap {
  position: relative;
  min-height: 620px;
  display: grid;
  place-items: center;
  padding: 20px 18px;
  border-radius: 28px;
  border: 1px solid rgba(216, 226, 239, 0.95);
  background:
    radial-gradient(circle at 50% 18%, rgba(15,76,129,0.10), transparent 28%),
    radial-gradient(circle at 88% 82%, rgba(47,133,90,0.09), transparent 26%),
    radial-gradient(circle at 12% 86%, rgba(107,70,193,0.08), transparent 22%),
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(246,250,253,0.97));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    inset 0 0 0 1px rgba(255,255,255,0.35),
    0 16px 36px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.map-wrap::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 22px;
  border: 1px solid rgba(216, 226, 239, 0.70);
  pointer-events: none;
}

.map-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(15,23,42,0.035) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(rgba(15,23,42,0.035) 1px, transparent 1px) 0 0 / 44px 44px;
  opacity: .18;
}

.map-frame {
  position: relative;
  z-index: 1;
  width: min(100%, 720px);
  aspect-ratio: 1045 / 1428;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.16);
}

.map-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.map-markers {
  position: absolute;
  inset: 0;
}


.map-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  z-index: 2;
}

.map-marker__pulse,
.map-marker__dot {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 999px;
}

.map-marker__pulse {
  width: 26px;
  height: 26px;
  background: color-mix(in srgb, var(--marker-color, #0f4c81) 18%, white);
  opacity: .65;
}

.map-marker__dot {
  width: 13px;
  height: 13px;
  background: var(--marker-color, #0f4c81);
  border: 3px solid rgba(255,255,255,0.95);
  box-shadow: 0 6px 14px rgba(15,23,42,.25);
}

.map-marker__label {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: 142px;
  white-space: normal;
  text-align: center;
  line-height: 1.12;
  background: rgba(255,255,255,0.97);
  border: 1px solid rgba(216, 226, 239, 0.95);
  border-radius: 12px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  color: #0f172a;
  box-shadow: 0 10px 20px rgba(15,23,42,.12);
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}

.map-marker__label::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: rgba(255,255,255,0.97);
  border-right: 1px solid rgba(216, 226, 239, 0.95);
  border-bottom: 1px solid rgba(216, 226, 239, 0.95);
}

.map-marker:hover .map-marker__label,
.map-marker:focus .map-marker__label,
.map-marker.department-active .map-marker__label,
.map-marker.editor-selected .map-marker__label {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.map-frame.map-muted .map-marker {
  opacity: .4;
}

.map-frame.map-muted .map-marker.jurisdiction-active,
.map-frame.map-muted .map-marker.department-active {
  opacity: 1;
}

.map-marker.jurisdiction-active .map-marker__pulse {
  width: 36px;
  height: 36px;
  opacity: .7;
}

.map-marker.department-active .map-marker__pulse {
  width: 46px;
  height: 46px;
  opacity: .8;
}

.map-marker.department-active .map-marker__dot {
  width: 18px;
  height: 18px;
  box-shadow: 0 0 0 6px rgba(255,255,255,.68), 0 10px 20px rgba(15,23,42,.25);
}

.map-marker.keyboard-focus .map-marker__dot,
.map-marker:focus-visible .map-marker__dot {
  outline: 3px solid rgba(15,76,129,.35);
  outline-offset: 4px;
}

.map-loading {
  color: var(--muted);
  font-weight: 800;
}

.map-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(216, 226, 239, 0.95);
  background: rgba(248, 250, 252, 0.92);
}

.depto {
  stroke: #ffffff;
  stroke-width: 3;
  cursor: pointer;
  transition: opacity 0.2s ease, filter 0.2s ease, stroke-width 0.2s ease;
}

.depto[data-jurisdiccion="obera"] { fill: rgba(15, 76, 129, 0.34); }
.depto[data-jurisdiccion="posadas"] { fill: rgba(47, 133, 90, 0.34); }
.depto[data-jurisdiccion="eldorado"] { fill: rgba(221, 107, 32, 0.34); }
.depto[data-jurisdiccion="puerto-iguazu"] { fill: rgba(107, 70, 193, 0.34); }

.depto:hover,
.depto.keyboard-focus {
  filter: brightness(1.06) saturate(1.18);
  stroke-width: 5;
}

.map-muted .depto {
  opacity: 0.22;
}

.map-muted .depto.jurisdiction-active {
  opacity: 0.72;
}

.map-muted .depto.department-active {
  opacity: 1;
  filter: drop-shadow(0 8px 18px rgba(15, 23, 42, 0.25)) saturate(1.2);
  stroke: #142033;
  stroke-width: 5;
}

.map-label {
  fill: #102033;
  font-size: 14px;
  font-weight: 900;
  pointer-events: none;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 5px;
  stroke-linejoin: round;
}

.table-tools {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.table-tools input,
.table-tools select {
  min-width: 210px;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tab {
  border: 1px solid var(--line);
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 9px 13px;
  font-weight: 900;
}

.tab.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.table-summary {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.table-responsive {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: #fff;
  font-size: 14px;
}

th,
td {
  padding: 12px 11px;
  border-bottom: 1px solid #edf2f7;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f1f5f9;
  color: #334155;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

tr:hover td {
  background: #f8fafc;
}

.small-muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

.notice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.notice {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #fff;
  line-height: 1.5;
}

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

.notice p {
  margin: 0;
  color: #475569;
  font-size: 14px;
}

.notice-info {
  border-color: rgba(15, 76, 129, 0.24);
  background: var(--primary-soft);
}

.notice-warning {
  border-color: rgba(180, 83, 9, 0.22);
  background: var(--warning-soft);
}

.notice-source {
  border-color: rgba(8, 127, 91, 0.22);
  background: var(--success-soft);
}

.site-footer {
  padding: 18px 0 28px;
  color: var(--muted);
  font-size: 13px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 360px;
  padding: 13px 15px;
  border-radius: 16px;
  color: #fff;
  background: #142033;
  box-shadow: var(--shadow);
  transform: translateY(30px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 100;
  font-weight: 750;
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}

@media print {
  .site-header,
  .hero-card,
  .data-card,
  .notice-grid,
  .site-footer,
  .result-actions,
  .map-card,
  .toast {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .content-grid {
    display: block;
  }

  .card {
    border: 0;
    box-shadow: none;
  }
}

@media (max-width: 980px) {
  .hero-card,
  .content-grid,
  .notice-grid {
    grid-template-columns: 1fr;
  }

  .map-wrap {
    min-height: 420px;
  }
}

@media (max-width: 680px) {
  .container {
    width: min(100% - 18px, 1240px);
  }

  .header-inner,
  .footer-inner,
  .card-heading,
  .search-row {
    flex-direction: column;
    display: flex;
    align-items: stretch;
  }

  .header-meta {
    justify-content: flex-start;
  }

  .hero-card,
  .card {
    padding: 16px;
    border-radius: 22px;
  }

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

  .table-tools input,
  .table-tools select {
    min-width: 100%;
  }
}

@media (max-width: 720px) {
  .brand-logo { width: 100%; max-height: 76px; }
}


/* Ajuste institucional final: encabezado blanco para integrar correctamente el logo oficial. */
.site-header {
  background: #ffffff !important;
  backdrop-filter: none !important;
}

@media (max-width: 760px) {
  .site-header {
    padding: 10px 0;
  }

  .header-inner {
    align-items: flex-start;
  }

  .brand-logo {
    max-height: 74px;
    width: min(100%, 420px);
  }

  .header-meta {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .map-wrap { min-height: 560px; padding: 14px 10px; }
  .map-frame { width: min(100%, 620px); }
  .map-marker__label { font-size: 10px; padding: 3px 7px; max-width: 116px; bottom: 17px; }
}


/* =========================
   EDITOR TEMPORAL DE MARCADORES DEL MAPA
   Se activa abriendo la página con ?mapedit=1 o ?editarMapa=1
   ========================= */
.map-frame.map-editor-enabled {
  cursor: crosshair;
}

.map-marker.editor-selected .map-marker__pulse {
  width: 54px;
  height: 54px;
  opacity: .92;
  background: color-mix(in srgb, var(--marker-color, #0f4c81) 26%, white);
}

.map-marker.editor-selected .map-marker__dot {
  width: 20px;
  height: 20px;
  box-shadow:
    0 0 0 7px rgba(255,255,255,.72),
    0 0 0 11px color-mix(in srgb, var(--marker-color, #0f4c81) 20%, transparent),
    0 12px 24px rgba(15,23,42,.28);
}

.map-editor-panel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: min(520px, calc(100vw - 36px));
  max-height: min(760px, calc(100vh - 36px));
  z-index: 9999;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(216, 226, 239, 0.95);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 26px 70px rgba(15,23,42,.22);
  backdrop-filter: blur(12px);
}

.map-editor-panel.collapsed .map-editor-body {
  display: none;
}

.map-editor-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
}

.map-editor-header strong {
  display: block;
  font-size: 15px;
}

.map-editor-header span {
  display: block;
  margin-top: 3px;
  color: rgba(255,255,255,.78);
  font-size: 12px;
}

.map-editor-close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,.12);
  font-size: 22px;
  line-height: 1;
}

.map-editor-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.map-editor-current {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(216, 226, 239, 0.95);
  border-radius: 16px;
  background: #f8fafc;
}

.map-editor-current label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  color: #475569;
  font-weight: 900;
}

.map-editor-current select,
.map-editor-current input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
}

.map-editor-coords {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.map-editor-nudge {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.map-editor-nudge button,
.map-editor-actions button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: #334155;
  font-weight: 900;
}

.map-editor-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.map-editor-actions button:first-child {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.map-editor-help {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.map-editor-help code {
  color: #0f4c81;
  font-weight: 900;
}

.map-editor-table-wrap {
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.map-editor-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-size: 12px;
}

.map-editor-table th,
.map-editor-table td {
  padding: 8px;
  border-bottom: 1px solid #edf2f7;
  text-align: left;
}

.map-editor-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f1f5f9;
  color: #334155;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.map-editor-table tr.active td {
  background: #e7f0fa;
}

.map-editor-table button {
  border: 0;
  background: transparent;
  color: #0f4c81;
  font-weight: 900;
  text-align: left;
  padding: 0;
}

.map-editor-table input {
  width: 78px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 7px;
  font-weight: 800;
}

@media (max-width: 640px) {
  .map-editor-panel {
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
  }

  .map-editor-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
