:root {
  color-scheme: dark;
  --fondo: #172117;
  --texto: #f4f1e8;
  --suave: #c5d0bf;
  --linea: #3a4a3c;
  --boton: #e6c36a;
  --boton-texto: #1c1608;
  --error: #ffd7d0;
  --error-fondo: #5c2a24;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  background: var(--fondo);
  color: var(--texto);
  line-height: 1.45;
}

h1 {
  font-size: 1.45rem;
  line-height: 1.2;
  margin: 0 0 0.6rem;
}

p { margin: 0 0 0.8rem; }

a { color: #f0d48a; }

label {
  display: block;
  margin: 0.8rem 0 0.3rem;
  color: var(--suave);
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 0.65rem 0.7rem;
  border-radius: 6px;
  border: 1px solid var(--linea);
  background: #101710;
  color: var(--texto);
  font: inherit;
}

button {
  display: inline-block;
  margin-top: 0.9rem;
  background: var(--boton);
  color: var(--boton-texto);
  border: 0;
  border-radius: 6px;
  padding: 0.7rem 1rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

button.secundario {
  background: transparent;
  color: var(--texto);
  border: 1px solid var(--linea);
}

.marca {
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--suave);
  font-size: 0.78rem;
}

.ayuda { color: var(--suave); }

.error {
  background: var(--error-fondo);
  color: var(--error);
  padding: 0.7rem 0.8rem;
  border-radius: 6px;
}

.entrada {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.tarjeta {
  width: min(100%, 26rem);
}

.tarjeta form button { width: 100%; }

.salir { margin-top: 1.4rem; }

body.mapa {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

body.mapa aside {
  width: 24rem;
  flex: none;
  overflow: auto;
  padding: 1.1rem 1.2rem 1.6rem;
  border-right: 1px solid var(--linea);
}

body.mapa #map {
  flex: 1;
  height: 100vh;
  background: #0d140f;
}

.fila {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.fila input { flex: 1; }
.fila button { margin-top: 0; white-space: nowrap; }

.coordenadas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

#lugares button {
  width: 100%;
  margin-top: 0.4rem;
  text-align: left;
}

.pasos {
  display: flex;
  gap: 0.8rem;
  margin: 1rem 0;
}

.pasos a {
  color: var(--suave);
  text-decoration: none;
}

.pasos a[aria-current="step"] {
  color: var(--boton);
  text-decoration: underline;
  text-underline-offset: 0.25rem;
}

.medida { color: var(--boton); }

.potreros {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
}

.potreros li {
  border-top: 1px solid var(--linea);
  padding: 0.7rem 0;
}

.potreros .vacio {
  color: var(--suave);
  border-top: 0;
}

.renombrar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem 0.6rem;
  align-items: center;
}

.renombrar input { grid-column: 1 / -1; }
.renombrar span { color: var(--suave); }
.renombrar button,
.quitar button { margin-top: 0; }

.potrero-etiqueta {
  background: rgba(23, 33, 23, 0.9);
  color: #f4f1e8;
  border: 0;
  border-radius: 4px;
  box-shadow: none;
  font-weight: 650;
}

.potrero-etiqueta::before { display: none; }

.leaflet-control-attribution {
  max-width: 14rem;
  background: rgba(23, 33, 23, 0.72);
  color: rgba(244, 241, 232, 0.8);
  font-size: 10px;
  line-height: 1.3;
  white-space: normal;
}

@media (max-width: 800px) {
  body.mapa {
    flex-direction: column;
    height: auto;
    overflow: auto;
  }

  body.mapa aside {
    width: auto;
    border-right: 0;
    border-bottom: 1px solid var(--linea);
  }

  body.mapa #map {
    height: 70vh;
    flex: none;
  }
}
