:root {
  --primario: #0f766e;
  --peligro: #b91c1c;
  --fondo: #ffffff;
  --texto: #1f2937;
  --suave: #6b7280;
  --borde: #e5e7eb;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--texto);
  background: var(--fondo);
}

#map {
  position: absolute;
  inset: 0;
}

.estado {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(17, 24, 39, 0.85);
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  z-index: 2;
  white-space: nowrap;
}
.estado.grabando { background: var(--peligro); }

.panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  background: var(--fondo);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  padding: 16px 16px calc(env(safe-area-inset-bottom) + 16px);
  max-width: 560px;
  margin: 0 auto;
}

label { font-size: 14px; color: var(--suave); }

input[type="text"], input:not([type]) {
  width: 100%;
  font-size: 17px;
  padding: 12px;
  margin: 6px 0 12px;
  border: 1px solid var(--borde);
  border-radius: 10px;
}

.rol {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
}
.rol label {
  color: var(--texto);
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn {
  display: block;
  width: 100%;
  font-size: 17px;
  font-weight: 600;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  margin-top: 8px;
  cursor: pointer;
}
.btn-primario { background: var(--primario); color: #fff; }
.btn-peligro { background: var(--peligro); color: #fff; }
.btn-secundario { background: transparent; color: var(--suave); }
.btn:disabled { opacity: 0.5; }

.contadores {
  display: flex;
  justify-content: space-around;
  text-align: center;
  margin-bottom: 8px;
}
.contadores span {
  display: block;
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.contadores small { color: var(--suave); }

.aviso, .pendientes {
  font-size: 13px;
  color: var(--suave);
  text-align: center;
  margin: 8px 0 0;
}
